@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.
Files changed (412) hide show
  1. package/dist/accordion/index.js +7 -3
  2. package/dist/adaptive/index.js +16 -2
  3. package/dist/address-block/index.js +23 -0
  4. package/dist/alert/index.js +8 -2
  5. package/dist/analyzer/index.js +17 -6
  6. package/dist/announcement/index.js +18 -5
  7. package/dist/appearance-picker/index.js +15 -0
  8. package/dist/audio-player/index.js +29 -3
  9. package/dist/avatar/index.js +5 -2
  10. package/dist/avatar-group/index.js +9 -3
  11. package/dist/badge/index.js +10 -4
  12. package/dist/banner/index.js +6 -2
  13. package/dist/board/index.js +18 -6
  14. package/dist/button/index.js +9 -3
  15. package/dist/camera-permission/index.js +23 -12
  16. package/dist/capture-result/index.js +30 -17
  17. package/dist/card/index.js +10 -3
  18. package/dist/card-form/index.js +19 -9
  19. package/dist/carousel/index.js +6 -2
  20. package/dist/chart/index.js +18 -5
  21. package/dist/charts/index.js +21 -6
  22. package/dist/chat/index.js +41 -0
  23. package/dist/checkbox/index.js +9 -5
  24. package/dist/checklist/index.js +20 -8
  25. package/dist/checkout/index.js +30 -12
  26. package/dist/chip/index.js +11 -5
  27. package/dist/chunk-2BZD3NAP.js +1110 -0
  28. package/dist/chunk-2YKVID2V.js +35 -0
  29. package/dist/{chunk-JUAMLEHX.js → chunk-36DA3IPO.js} +137 -37
  30. package/dist/chunk-3A56MIAN.js +599 -0
  31. package/dist/chunk-3SCKCWF5.js +298 -0
  32. package/dist/chunk-3TZNDHKO.js +187 -0
  33. package/dist/chunk-43K3BLXV.js +9 -0
  34. package/dist/chunk-46ZJIQ2Z.js +208 -0
  35. package/dist/chunk-4CZMQDQL.js +192 -0
  36. package/dist/chunk-5DTKORLI.js +255 -0
  37. package/dist/{chunk-LOE5YNN3.js → chunk-5J4WFXFA.js} +68 -24
  38. package/dist/chunk-5KJ7TEQ6.js +305 -0
  39. package/dist/chunk-5NU33TXK.js +529 -0
  40. package/dist/chunk-5Z5ZYMOJ.js +1 -0
  41. package/dist/chunk-6KSUS7DF.js +690 -0
  42. package/dist/chunk-6RV6UW2J.js +349 -0
  43. package/dist/chunk-6RZM7RP2.js +520 -0
  44. package/dist/{chunk-4BXMXBJO.js → chunk-75BDCC7K.js} +24 -11
  45. package/dist/{chunk-PZXZJBMP.js → chunk-7CGJBQUA.js} +357 -32
  46. package/dist/{chunk-CJ5EOYZE.js → chunk-7IVF6JLJ.js} +24 -7
  47. package/dist/chunk-7IWCGXYA.js +143 -0
  48. package/dist/chunk-7LM4ASFH.js +172 -0
  49. package/dist/chunk-7MCEJFWV.js +341 -0
  50. package/dist/chunk-7NGMUVNU.js +245 -0
  51. package/dist/chunk-7PBSIXT7.js +355 -0
  52. package/dist/chunk-7QOYGENL.js +443 -0
  53. package/dist/{chunk-H6NIOQHK.js → chunk-A7SWYDE5.js} +66 -15
  54. package/dist/chunk-ADHPJALR.js +3051 -0
  55. package/dist/chunk-ALJYZLNQ.js +509 -0
  56. package/dist/chunk-APCWFOZW.js +28 -0
  57. package/dist/chunk-AQ5FIG74.js +419 -0
  58. package/dist/chunk-AWKQIE5I.js +139 -0
  59. package/dist/chunk-B2MMZZQB.js +426 -0
  60. package/dist/{chunk-ZVFE5QGU.js → chunk-B7JZ3N5G.js} +174 -97
  61. package/dist/chunk-BL37SW6G.js +1314 -0
  62. package/dist/chunk-BTRMA7GC.js +21 -0
  63. package/dist/chunk-C7IUWIUZ.js +643 -0
  64. package/dist/chunk-CA3DUVYD.js +10 -0
  65. package/dist/{chunk-S7F6XLTK.js → chunk-CBCJSO2B.js} +213 -54
  66. package/dist/chunk-CHPX4MFI.js +239 -0
  67. package/dist/chunk-CLGAMIOT.js +648 -0
  68. package/dist/chunk-CUE7VML6.js +1141 -0
  69. package/dist/chunk-CVU6S2E5.js +1587 -0
  70. package/dist/{chunk-AZRX6SAC.js → chunk-CXPQMA6Z.js} +112 -37
  71. package/dist/chunk-D2LN4I7I.js +581 -0
  72. package/dist/{chunk-UWFLYMAR.js → chunk-D34LNBO5.js} +635 -238
  73. package/dist/chunk-D4BCQICM.js +765 -0
  74. package/dist/chunk-EABKIIA4.js +1 -0
  75. package/dist/chunk-EICSYRAG.js +341 -0
  76. package/dist/chunk-EMWAJMAS.js +83 -0
  77. package/dist/chunk-EOLZWRV6.js +149 -0
  78. package/dist/chunk-EOQVTGB6.js +350 -0
  79. package/dist/{chunk-BEDBFJND.js → chunk-ESGUHNB2.js} +119 -43
  80. package/dist/{chunk-Q72LJOVE.js → chunk-F2KNBPKY.js} +74 -18
  81. package/dist/{chunk-O7AE6DAF.js → chunk-G7H3NX3G.js} +57 -24
  82. package/dist/chunk-GM7YIPB7.js +1052 -0
  83. package/dist/chunk-GVQQG435.js +581 -0
  84. package/dist/chunk-HE43OMEL.js +1056 -0
  85. package/dist/chunk-HHOMFQ7R.js +2535 -0
  86. package/dist/chunk-HJFFOOJ4.js +1 -0
  87. package/dist/chunk-HNAKS4Z3.js +207 -0
  88. package/dist/chunk-HP6ST2OW.js +352 -0
  89. package/dist/chunk-HW3OWDTU.js +1 -0
  90. package/dist/{chunk-3ENTMPQY.js → chunk-HZDB44K4.js} +102 -52
  91. package/dist/chunk-I2KLQ2HA.js +19 -0
  92. package/dist/chunk-I6CUP2LW.js +1155 -0
  93. package/dist/chunk-ICV4Y2WY.js +27 -0
  94. package/dist/chunk-IHSIENOE.js +3950 -0
  95. package/dist/{chunk-CUMUNPXY.js → chunk-IMMALLRU.js} +68 -32
  96. package/dist/chunk-J64KGCGX.js +55 -0
  97. package/dist/{chunk-IVNRBPGC.js → chunk-JA6TK7H2.js} +255 -84
  98. package/dist/{chunk-OOPPQH27.js → chunk-JAVZ5JPV.js} +83 -29
  99. package/dist/chunk-JCMTP3E4.js +1251 -0
  100. package/dist/{chunk-U7TFM2JA.js → chunk-JCXFFK64.js} +75 -18
  101. package/dist/chunk-JWCVBFDU.js +236 -0
  102. package/dist/chunk-JXRTD5RI.js +414 -0
  103. package/dist/chunk-JYIUZUIQ.js +1567 -0
  104. package/dist/chunk-K3TK3GIV.js +219 -0
  105. package/dist/chunk-KEVZIHM2.js +1511 -0
  106. package/dist/chunk-KHZDNQQD.js +171 -0
  107. package/dist/chunk-KL4GDV4V.js +131 -0
  108. package/dist/chunk-KNILMM4H.js +225 -0
  109. package/dist/chunk-KRBUZV45.js +25 -0
  110. package/dist/{chunk-ITTYJZWX.js → chunk-KXLDK6HB.js} +161 -45
  111. package/dist/chunk-KZ3X7TSL.js +196 -0
  112. package/dist/chunk-L2WMOA2V.js +474 -0
  113. package/dist/chunk-L4D5LHCH.js +109 -0
  114. package/dist/chunk-LAUJPLDB.js +853 -0
  115. package/dist/{chunk-SBMNWWBV.js → chunk-LGNTP5XA.js} +89 -17
  116. package/dist/chunk-LUZFCCSD.js +271 -0
  117. package/dist/{chunk-HPPW424V.js → chunk-LXJCP4PL.js} +129 -37
  118. package/dist/chunk-MCOZJWPU.js +731 -0
  119. package/dist/chunk-MG4SKWLL.js +2587 -0
  120. package/dist/chunk-MPEPTSER.js +414 -0
  121. package/dist/chunk-MWPJ4YGP.js +1 -0
  122. package/dist/{chunk-TKQYWZ5V.js → chunk-N7AX4OA4.js} +108 -41
  123. package/dist/chunk-NHSLM6SE.js +523 -0
  124. package/dist/chunk-NNCOFLNE.js +24 -0
  125. package/dist/{chunk-J7Q7VCVC.js → chunk-NNJLVA7M.js} +54 -15
  126. package/dist/chunk-NZG75DGA.js +282 -0
  127. package/dist/chunk-O76QXRBV.js +431 -0
  128. package/dist/chunk-OANH27AK.js +223 -0
  129. package/dist/chunk-OCHPK5YV.js +609 -0
  130. package/dist/chunk-OMHVEVX4.js +436 -0
  131. package/dist/{chunk-YF4NSSMT.js → chunk-ONKQUJWD.js} +220 -65
  132. package/dist/chunk-OVTK7A6T.js +615 -0
  133. package/dist/chunk-PCEFCOLN.js +120 -0
  134. package/dist/chunk-PFLNFIVB.js +186 -0
  135. package/dist/chunk-PHSZY37H.js +300 -0
  136. package/dist/chunk-PJLTKDVY.js +18 -0
  137. package/dist/{chunk-4YIP3CWS.js → chunk-PK7BN3MI.js} +89 -19
  138. package/dist/{chunk-KMI5ML5I.js → chunk-PWFRDRGS.js} +155 -29
  139. package/dist/chunk-PYPMD46W.js +707 -0
  140. package/dist/chunk-Q6CCHDI7.js +331 -0
  141. package/dist/chunk-QFA5WS2A.js +750 -0
  142. package/dist/chunk-QJMMM4RC.js +124 -0
  143. package/dist/chunk-QNZII37O.js +10 -0
  144. package/dist/chunk-QYWEVAM6.js +407 -0
  145. package/dist/chunk-R5T4VZ7Z.js +126 -0
  146. package/dist/chunk-R77HFLZD.js +1 -0
  147. package/dist/{chunk-YC6WORFL.js → chunk-RAESDNU5.js} +228 -102
  148. package/dist/chunk-RBYQUXNL.js +1 -0
  149. package/dist/chunk-RCM3DT5E.js +1 -0
  150. package/dist/chunk-RGNY56L7.js +282 -0
  151. package/dist/chunk-RIK6UX2K.js +344 -0
  152. package/dist/{chunk-LAECSR4H.js → chunk-RJA3RXO3.js} +75 -60
  153. package/dist/chunk-RJYRJ3LD.js +1 -0
  154. package/dist/chunk-RMA3NOY4.js +599 -0
  155. package/dist/{chunk-DM5QUKKO.js → chunk-RSWKKAHK.js} +160 -66
  156. package/dist/chunk-RVOIIX3V.js +204 -0
  157. package/dist/chunk-SA2RRBGT.js +1077 -0
  158. package/dist/chunk-SG3J4R45.js +1428 -0
  159. package/dist/chunk-SPUK7JD4.js +238 -0
  160. package/dist/chunk-SWXV2K5N.js +434 -0
  161. package/dist/chunk-SYJEPXP6.js +1303 -0
  162. package/dist/{chunk-N32RGOA5.js → chunk-SZLI34TA.js} +93 -28
  163. package/dist/{chunk-4GBOGOTV.js → chunk-T77WJA74.js} +143 -18
  164. package/dist/chunk-TDWWVJA4.js +630 -0
  165. package/dist/chunk-TFHI5XDR.js +610 -0
  166. package/dist/chunk-TH4PW2WU.js +17 -0
  167. package/dist/chunk-TTQ24HQX.js +12 -0
  168. package/dist/chunk-TUACVJNG.js +12 -0
  169. package/dist/{chunk-CYRBHQQZ.js → chunk-TUL5RUIA.js} +201 -59
  170. package/dist/{chunk-4ZAHCY44.js → chunk-TYOSA7JG.js} +74 -38
  171. package/dist/chunk-TYQTMMEV.js +1 -0
  172. package/dist/chunk-TZO6YDS7.js +346 -0
  173. package/dist/chunk-U3ETF22F.js +328 -0
  174. package/dist/chunk-U6BYHD2N.js +213 -0
  175. package/dist/{chunk-WSW6ZFAQ.js → chunk-UF6EJXPQ.js} +20 -5
  176. package/dist/chunk-UNNQIPGK.js +792 -0
  177. package/dist/chunk-UQEN55EY.js +1 -0
  178. package/dist/chunk-UQVO6AJV.js +171 -0
  179. package/dist/chunk-VFDQAAIW.js +351 -0
  180. package/dist/chunk-VIUE3VQT.js +1 -0
  181. package/dist/chunk-VJLSSSGC.js +438 -0
  182. package/dist/chunk-VLMT6KYT.js +350 -0
  183. package/dist/chunk-VMHGBUGS.js +35 -0
  184. package/dist/{chunk-7O2FMUPT.js → chunk-VQKPBYW6.js} +400 -139
  185. package/dist/{chunk-EJBDRVIH.js → chunk-VSSTWLC5.js} +61 -16
  186. package/dist/chunk-VZYYZRPN.js +1992 -0
  187. package/dist/chunk-W23G6JLF.js +37 -0
  188. package/dist/chunk-WAIJCD2V.js +480 -0
  189. package/dist/chunk-WFMQ3WKM.js +378 -0
  190. package/dist/chunk-WJ2KDRMY.js +66 -0
  191. package/dist/chunk-WKFZJO54.js +437 -0
  192. package/dist/{chunk-SYNOJOQO.js → chunk-WVVD3XOV.js} +189 -93
  193. package/dist/chunk-XAIWMSLB.js +1 -0
  194. package/dist/chunk-XBXUBBJZ.js +98 -0
  195. package/dist/chunk-XCU7MYBJ.js +1 -0
  196. package/dist/chunk-XHE4PGCI.js +717 -0
  197. package/dist/chunk-XRSJ32M3.js +331 -0
  198. package/dist/chunk-XTCVOEAW.js +1 -0
  199. package/dist/chunk-XWGXVQF6.js +58 -0
  200. package/dist/{chunk-35OFI3JG.js → chunk-Y3XKKO5K.js} +258 -123
  201. package/dist/chunk-Y4QNMBLO.js +533 -0
  202. package/dist/chunk-Y5H4CTKO.js +1 -0
  203. package/dist/chunk-YBQIN75A.js +403 -0
  204. package/dist/chunk-YJ5PXOX3.js +158 -0
  205. package/dist/{chunk-AWJOCGFZ.js → chunk-YLRSRUPS.js} +81 -55
  206. package/dist/chunk-YM6MPJ4A.js +1 -0
  207. package/dist/chunk-YV7KZENV.js +200 -0
  208. package/dist/chunk-Z7I4ZSO6.js +316 -0
  209. package/dist/chunk-ZIRMWD2B.js +555 -0
  210. package/dist/chunk-ZPMG3FWU.js +75 -0
  211. package/dist/{chunk-QWCMU5B2.js → chunk-ZTXMK2G7.js} +289 -115
  212. package/dist/chunk-ZVJCWXAL.js +541 -0
  213. package/dist/{chunk-P23EQNRQ.js → chunk-ZYQ23DPT.js} +215 -49
  214. package/dist/coachmark/index.js +10 -3
  215. package/dist/code-block/index.js +6 -3
  216. package/dist/color-field/index.js +15 -5
  217. package/dist/color-picker/index.js +23 -0
  218. package/dist/commerce/index.js +31 -17
  219. package/dist/confirm/index.js +31 -0
  220. package/dist/connection-card/index.js +34 -0
  221. package/dist/connectivity/index.js +6 -2
  222. package/dist/context-menu/index.js +13 -3
  223. package/dist/copy-button/index.js +5 -2
  224. package/dist/data-grid/index.js +35 -17
  225. package/dist/date-range-picker/index.js +22 -9
  226. package/dist/description-list/index.js +6 -1
  227. package/dist/device-frame/index.js +30 -0
  228. package/dist/dialog/index.js +10 -2
  229. package/dist/divider/index.js +2 -0
  230. package/dist/empty-state/index.js +15 -2
  231. package/dist/error-summary/index.js +9 -2
  232. package/dist/fab/index.js +7 -2
  233. package/dist/file-manager/index.js +44 -0
  234. package/dist/file-upload/index.js +16 -7
  235. package/dist/filter-bar/index.js +14 -7
  236. package/dist/flow-run/index.js +23 -13
  237. package/dist/form/index.js +32 -3
  238. package/dist/gallery/index.js +8 -2
  239. package/dist/hold-to-confirm/index.js +6 -2
  240. package/dist/hover-card/index.js +18 -0
  241. package/dist/icon-tile/index.js +10 -0
  242. package/dist/image/index.js +9 -0
  243. package/dist/index.d.ts +30789 -12332
  244. package/dist/index.js +424 -135
  245. package/dist/infinite-list/index.js +6 -2
  246. package/dist/inline-edit/index.js +8 -5
  247. package/dist/input/index.js +7 -4
  248. package/dist/interactions/index.js +5 -1
  249. package/dist/invoice/index.js +22 -9
  250. package/dist/job-row/index.js +22 -0
  251. package/dist/json-inspector/index.js +20 -0
  252. package/dist/kbd/index.js +5 -1
  253. package/dist/keyboard/index.js +9 -2
  254. package/dist/level-meter/index.js +9 -0
  255. package/dist/list-row/index.js +14 -4
  256. package/dist/log-viewer/index.js +11 -2
  257. package/dist/map-view/index.js +16 -3
  258. package/dist/markdown/index.js +12 -6
  259. package/dist/metric/index.js +10 -4
  260. package/dist/metric-strip/index.js +12 -0
  261. package/dist/money/index.js +16 -3
  262. package/dist/nav-drawer/index.js +8 -2
  263. package/dist/nav-header/index.js +15 -0
  264. package/dist/navigation/index.js +32 -2
  265. package/dist/notification-center/index.js +28 -12
  266. package/dist/number-roll/index.js +7 -2
  267. package/dist/onboarding-pager/index.js +22 -0
  268. package/dist/one-handed/index.js +5 -3
  269. package/dist/os-surfaces/index.js +9 -3
  270. package/dist/otp/index.js +9 -5
  271. package/dist/page-header/index.js +3 -1
  272. package/dist/pagination/index.js +8 -0
  273. package/dist/payment-method/index.js +21 -11
  274. package/dist/payment-status/index.js +26 -15
  275. package/dist/permission/index.js +21 -2
  276. package/dist/picker/index.js +22 -6
  277. package/dist/progress/index.js +11 -3
  278. package/dist/provenance/index.js +16 -0
  279. package/dist/pull-to-refresh/index.js +4 -2
  280. package/dist/qr-code/index.js +16 -0
  281. package/dist/query-builder/index.js +30 -0
  282. package/dist/radio-group/index.js +9 -5
  283. package/dist/rating/index.js +10 -2
  284. package/dist/receivables/index.js +35 -17
  285. package/dist/recording-indicator/index.js +21 -0
  286. package/dist/refund/index.js +28 -15
  287. package/dist/repeatable-rows/index.js +19 -0
  288. package/dist/save-status/index.js +7 -3
  289. package/dist/screen/index.js +3 -0
  290. package/dist/scroll-area/index.js +3 -1
  291. package/dist/search-field/index.js +13 -0
  292. package/dist/secret-field/index.js +19 -0
  293. package/dist/section-header/index.js +4 -0
  294. package/dist/segmented-control/index.js +4 -3
  295. package/dist/sheet/index.js +11 -3
  296. package/dist/shortcuts-sheet/index.js +2 -0
  297. package/dist/sign-in-screen/index.js +25 -0
  298. package/dist/skeleton/index.js +5 -1
  299. package/dist/slider/index.js +5 -2
  300. package/dist/sortable/index.js +8 -0
  301. package/dist/spinner/index.js +4 -1
  302. package/dist/split-button/index.js +21 -6
  303. package/dist/spotlight/index.js +9 -1
  304. package/dist/stack/index.js +2 -0
  305. package/dist/stage-timeline/index.js +8 -3
  306. package/dist/status-dot/index.js +8 -2
  307. package/dist/stepper/index.js +11 -4
  308. package/dist/streaming-text/index.js +4 -2
  309. package/dist/survey/index.js +29 -16
  310. package/dist/switch/index.js +9 -3
  311. package/dist/system-state/index.js +15 -4
  312. package/dist/tab-bar/index.js +13 -2
  313. package/dist/tabs/index.js +12 -2
  314. package/dist/tags-input/index.js +13 -0
  315. package/dist/text/index.js +4 -0
  316. package/dist/textarea/index.js +8 -5
  317. package/dist/thinking/index.js +6 -1
  318. package/dist/tile-rail/index.js +10 -0
  319. package/dist/time-field/index.js +20 -0
  320. package/dist/time-range-control/index.js +36 -0
  321. package/dist/timeline/index.js +4 -2
  322. package/dist/toast/index.js +6 -2
  323. package/dist/toolbar/index.js +5 -2
  324. package/dist/tour/index.js +15 -10
  325. package/dist/transcript/index.js +28 -0
  326. package/dist/truncation-notice/index.js +5 -2
  327. package/dist/update-notice/index.js +19 -9
  328. package/dist/video-player/index.js +29 -2
  329. package/dist/viewfinder/index.js +15 -5
  330. package/dist/widget/index.js +14 -4
  331. package/dist/wizard/index.js +10 -4
  332. package/package.json +13 -12
  333. package/dist/chunk-223Q2T2Q.js +0 -229
  334. package/dist/chunk-2A5NIQAK.js +0 -254
  335. package/dist/chunk-2GK6PHGE.js +0 -363
  336. package/dist/chunk-2ZZ7TDJ4.js +0 -324
  337. package/dist/chunk-3ARE4TES.js +0 -195
  338. package/dist/chunk-3NMD74ZU.js +0 -4
  339. package/dist/chunk-3WPW4KUN.js +0 -182
  340. package/dist/chunk-423B7SPN.js +0 -993
  341. package/dist/chunk-47FWHGUN.js +0 -394
  342. package/dist/chunk-4DS5ZWVC.js +0 -83
  343. package/dist/chunk-4SZYY6AN.js +0 -99
  344. package/dist/chunk-4YQOR7JM.js +0 -204
  345. package/dist/chunk-52X2VYTD.js +0 -228
  346. package/dist/chunk-5YNTNN5A.js +0 -177
  347. package/dist/chunk-6HT2LP62.js +0 -504
  348. package/dist/chunk-6N33LFQA.js +0 -35
  349. package/dist/chunk-6X6PQ443.js +0 -432
  350. package/dist/chunk-7CFF4HXS.js +0 -126
  351. package/dist/chunk-AI4DWZCD.js +0 -162
  352. package/dist/chunk-BTTFCMKG.js +0 -166
  353. package/dist/chunk-BV3B2HYZ.js +0 -1635
  354. package/dist/chunk-C2NTXVWM.js +0 -98
  355. package/dist/chunk-CDRZHT42.js +0 -424
  356. package/dist/chunk-DHWADYZX.js +0 -144
  357. package/dist/chunk-F5XNPWS7.js +0 -1024
  358. package/dist/chunk-FMYDDECK.js +0 -1521
  359. package/dist/chunk-GDKZTW34.js +0 -395
  360. package/dist/chunk-GL7B2DOW.js +0 -134
  361. package/dist/chunk-GNNJ4GCC.js +0 -471
  362. package/dist/chunk-HET4LLMX.js +0 -129
  363. package/dist/chunk-HZ6CNMAF.js +0 -870
  364. package/dist/chunk-IIQTAY3J.js +0 -715
  365. package/dist/chunk-JNH2TYIN.js +0 -96
  366. package/dist/chunk-JNY4ZHAR.js +0 -634
  367. package/dist/chunk-JXJB2X6M.js +0 -131
  368. package/dist/chunk-LRJNDEIA.js +0 -302
  369. package/dist/chunk-LSS54GLJ.js +0 -116
  370. package/dist/chunk-LZLHELAG.js +0 -137
  371. package/dist/chunk-MOUJOP55.js +0 -425
  372. package/dist/chunk-NKB7BZYK.js +0 -167
  373. package/dist/chunk-NQYBUO3K.js +0 -1795
  374. package/dist/chunk-O4AEHWII.js +0 -464
  375. package/dist/chunk-OETCUXQP.js +0 -134
  376. package/dist/chunk-OPXFZ4Y5.js +0 -204
  377. package/dist/chunk-PJXUJYS6.js +0 -248
  378. package/dist/chunk-PUPM2YGF.js +0 -376
  379. package/dist/chunk-QCDXZBC5.js +0 -247
  380. package/dist/chunk-QDYDBCFP.js +0 -197
  381. package/dist/chunk-QJJ6MADV.js +0 -274
  382. package/dist/chunk-QKXCPTFS.js +0 -349
  383. package/dist/chunk-RIBDXGUG.js +0 -108
  384. package/dist/chunk-RJQOOHT2.js +0 -214
  385. package/dist/chunk-RNGLIHFA.js +0 -191
  386. package/dist/chunk-RQ3HASCC.js +0 -6
  387. package/dist/chunk-RSOJT5YW.js +0 -124
  388. package/dist/chunk-RUZHTGKB.js +0 -237
  389. package/dist/chunk-RW6ZL2FQ.js +0 -284
  390. package/dist/chunk-TKVFVF5D.js +0 -95
  391. package/dist/chunk-TOXAGRDQ.js +0 -144
  392. package/dist/chunk-TUTI5HOZ.js +0 -112
  393. package/dist/chunk-UC2WGUP3.js +0 -627
  394. package/dist/chunk-UYG5L34B.js +0 -87
  395. package/dist/chunk-VBOXAEPI.js +0 -336
  396. package/dist/chunk-VCDBXW5H.js +0 -188
  397. package/dist/chunk-VEAYTRPX.js +0 -414
  398. package/dist/chunk-VQHPQEUH.js +0 -273
  399. package/dist/chunk-VXDZFJGP.js +0 -874
  400. package/dist/chunk-XNUVB5OL.js +0 -375
  401. package/dist/chunk-XOSCY2CW.js +0 -242
  402. package/dist/chunk-XXXEFXY5.js +0 -99
  403. package/dist/chunk-YDGVJETP.js +0 -60
  404. package/dist/chunk-YG3ZJHGU.js +0 -223
  405. package/dist/chunk-YTFKPRUK.js +0 -845
  406. package/dist/chunk-Z7H7VSFZ.js +0 -323
  407. package/dist/header/index.js +0 -5
  408. package/dist/search-bar/index.js +0 -5
  409. /package/dist/{chunk-3ECPOSKO.js → chunk-3BKLBYPK.js} +0 -0
  410. /package/dist/{chunk-JRLTGLN4.js → chunk-3UG6JUCV.js} +0 -0
  411. /package/dist/{chunk-RTIKSY6A.js → chunk-4QCR3K2J.js} +0 -0
  412. /package/dist/{chunk-VFCUIDRT.js → chunk-5WWRTEPS.js} +0 -0
@@ -0,0 +1,1428 @@
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';
13
+ import { useLoamLocale } from './chunk-APCWFOZW.js';
14
+ import { Icon } from './chunk-PCEFCOLN.js';
15
+ import { useReducedMotion, useResolvedMotion, springConfig, motionTiming } from './chunk-J64KGCGX.js';
16
+ import * as React5 from 'react';
17
+ import { Animated, View, Text, Pressable, Platform, findNodeHandle, AccessibilityInfo, PanResponder, ScrollView, Easing } from 'react-native';
18
+ import Svg, { Defs, LinearGradient, Stop, Rect } from 'react-native-svg';
19
+ import { createStyleSheet, useLoamTheme, useStyles } from '@btndprojects/loam-theme-native';
20
+ import { localizeProfile, profile, pipelineFrom, estimateRange, failure, failureBody, failurePrimaryLabel, resultPrimaryLabel, fieldFlagged } from '@btndprojects/loam-analyzer';
21
+ import { jsx, jsxs } from 'react/jsx-runtime';
22
+ import { money } from '@btndprojects/loam-pay';
23
+
24
+ function ScanSweep({
25
+ active = true,
26
+ tone = "good",
27
+ size = "md",
28
+ label: labelProp,
29
+ motion,
30
+ loading = false
31
+ }) {
32
+ const theme = useLoamTheme("capture-result");
33
+ const t = useCaptureResultLabels();
34
+ const label = labelProp ?? (loading ? t.analysing : void 0);
35
+ const reduced = useReducedMotion();
36
+ const { styles } = useStyles(analysisSheet);
37
+ const [band, setBand] = React5.useState(0);
38
+ const phase = React5.useRef(new Animated.Value(0)).current;
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];
42
+ React5.useEffect(() => {
43
+ if (!active || still || band === 0) {
44
+ phase.setValue(0);
45
+ return;
46
+ }
47
+ const leg = (to) => Animated.timing(phase, {
48
+ toValue: to,
49
+ duration: theme.loop.spin * 2,
50
+ easing: Easing.bezier(...theme.easing.inOut),
51
+ useNativeDriver: true
52
+ });
53
+ const loop = Animated.loop(Animated.sequence([leg(1), leg(0)]));
54
+ loop.start();
55
+ return () => loop.stop();
56
+ }, [active, still, band, phase, theme.loop.spin, theme.easing.inOut]);
57
+ if (!active) return null;
58
+ const onLayout = (e) => setBand(e.nativeEvent.layout.height);
59
+ const translateY = still ? band : phase.interpolate({ inputRange: [0, 1], outputRange: [-band, band * 4] });
60
+ return /* @__PURE__ */ jsx(
61
+ View,
62
+ {
63
+ accessible: label ? true : false,
64
+ role: label ? "img" : void 0,
65
+ accessibilityLabel: label,
66
+ testID: "loam-scan-sweep",
67
+ accessibilityState: loading ? { busy: true } : void 0,
68
+ "aria-busy": loading || void 0,
69
+ style: styles.sweepRoot,
70
+ ...label ? null : decorativeProps(),
71
+ children: /* @__PURE__ */ jsx(
72
+ Animated.View,
73
+ {
74
+ testID: still ? "loam-scan-sweep-static" : "loam-scan-sweep-band",
75
+ onLayout,
76
+ style: [
77
+ styles.sweepBand,
78
+ size === "sm" ? styles.sweepSm : size === "lg" ? styles.sweepLg : null,
79
+ { transform: [{ translateY }] }
80
+ ],
81
+ children: /* @__PURE__ */ jsxs(Svg, { width: "100%", height: "100%", children: [
82
+ /* @__PURE__ */ jsx(Defs, { children: /* @__PURE__ */ jsxs(LinearGradient, { id: "loam-cam-sweep", x1: "0", y1: "0", x2: "0", y2: "1", children: [
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] })
86
+ ] }) }),
87
+ /* @__PURE__ */ jsx(Rect, { x: "0", y: "0", width: "100%", height: "100%", fill: "url(#loam-cam-sweep)" })
88
+ ] })
89
+ }
90
+ )
91
+ }
92
+ );
93
+ }
94
+ function StageBadge({ where, copy }) {
95
+ const words = useAnalyzerCopy(copy);
96
+ const privacy = where === "device" ? words.pipeline.device : words.pipeline.server;
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 }) });
98
+ }
99
+ function DoneCheck({ motion }) {
100
+ const theme = useLoamTheme("capture-result");
101
+ const reducedOs = useReducedMotion();
102
+ const lvl = useResolvedMotion(motion, "capture-result");
103
+ const reduced = reducedOs || lvl !== "full";
104
+ const v = React5.useRef(new Animated.Value(0)).current;
105
+ React5.useEffect(() => {
106
+ if (reduced) {
107
+ Animated.timing(v, {
108
+ duration: theme.duration.fast,
109
+ toValue: 1,
110
+ useNativeDriver: true
111
+ }).start();
112
+ return;
113
+ }
114
+ Animated.spring(v, { ...springConfig(theme, "fs"), toValue: 1, useNativeDriver: true }).start();
115
+ }, []);
116
+ return /* @__PURE__ */ jsx(
117
+ Animated.View,
118
+ {
119
+ style: {
120
+ opacity: v,
121
+ transform: reduced ? [] : [{ scale: v.interpolate({ inputRange: [0, 1], outputRange: [0.5, 1] }) }]
122
+ },
123
+ children: /* @__PURE__ */ jsx(Icon, { name: "check-circle", size: theme.icon.sm, color: theme.color.good })
124
+ }
125
+ );
126
+ }
127
+ function StageDot({
128
+ status,
129
+ motion
130
+ }) {
131
+ const theme = useLoamTheme("capture-result");
132
+ const { styles } = useStyles(analysisSheet, { status });
133
+ if (status === "done") return /* @__PURE__ */ jsx(DoneCheck, { motion });
134
+ if (status === "failed") {
135
+ return /* @__PURE__ */ jsx(Icon, { name: "alert-circle", size: theme.icon.sm, color: theme.color.danger });
136
+ }
137
+ return /* @__PURE__ */ jsx(View, { accessible: false, style: styles.dot });
138
+ }
139
+ function StageRow({
140
+ stage,
141
+ status = "pending",
142
+ labels,
143
+ copy,
144
+ motion
145
+ }) {
146
+ const t = useCaptureResultLabels(labels);
147
+ const words = useAnalyzerCopy(copy);
148
+ const { styles } = useStyles(analysisSheet, { status });
149
+ return /* @__PURE__ */ jsxs(
150
+ View,
151
+ {
152
+ role: "listitem",
153
+ accessible: true,
154
+ accessibilityLabel: `${stage.label}${t.stageNote(t.stageStatus[status], words.pipeline[stage.where])}`,
155
+ testID: `loam-stage-${status}`,
156
+ style: styles.stageRow,
157
+ children: [
158
+ /* @__PURE__ */ jsx(StageDot, { status, motion }),
159
+ /* @__PURE__ */ jsx(Text, { style: styles.stageLabel, children: stage.label }),
160
+ /* @__PURE__ */ jsx(StageBadge, { where: stage.where, copy })
161
+ ]
162
+ }
163
+ );
164
+ }
165
+ function defaultTitle(p, t) {
166
+ return p.id === "car" ? t.readingAngles : t.analysing;
167
+ }
168
+ function AnalysisProgress({
169
+ profile: profileProp,
170
+ index = 0,
171
+ title,
172
+ cancelLabel,
173
+ onCancel,
174
+ footer: footerProp,
175
+ announce = true,
176
+ labels,
177
+ copy,
178
+ tone,
179
+ size = "md",
180
+ variant = "elevated",
181
+ loading = false,
182
+ motion
183
+ }) {
184
+ const { styles } = useStyles(analysisSheet);
185
+ const theme = useLoamTheme("capture-result");
186
+ const t = useCaptureResultLabels(labels);
187
+ const words = useAnalyzerCopy(copy);
188
+ const footer = footerProp === void 0 ? words.pipeline.footer : footerProp;
189
+ const p = React5.useMemo(() => localizeProfile(profile(profileProp), words), [profileProp, words]);
190
+ const pipeline = pipelineFrom(p, index);
191
+ const heading = title ?? defaultTitle(p, t);
192
+ const active = pipeline.index >= 0 ? pipeline.stages[pipeline.index] : void 0;
193
+ const message = announce ? active ? words.pipeline.stageAria(active.stage.label, words.pipeline[active.stage.where]) : heading : null;
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
+ ) });
233
+ }
234
+ var analysisSheet = createStyleSheet((theme) => ({
235
+ sweepRoot: {
236
+ pointerEvents: "none",
237
+ position: "absolute",
238
+ top: theme.space[0],
239
+ bottom: theme.space[0],
240
+ left: theme.space[0],
241
+ right: theme.space[0],
242
+ overflow: "hidden"
243
+ },
244
+ sweepBand: {
245
+ position: "absolute",
246
+ left: theme.space[0],
247
+ right: theme.space[0],
248
+ top: theme.space[0],
249
+ height: "25%"
250
+ },
251
+ sweepSm: { height: "15%" },
252
+ sweepLg: { height: "40%" },
253
+ card: {
254
+ width: "100%",
255
+ maxWidth: theme.panel.lg
256
+ },
257
+ headingSm: { fontSize: theme.type.headline.fontSize },
258
+ headingLg: { fontSize: theme.type.title2.fontSize },
259
+ heading: {
260
+ fontFamily: theme.font.sans,
261
+ fontSize: theme.type.title3.fontSize,
262
+ fontWeight: theme.fontWeight.semibold,
263
+ color: theme.color.text
264
+ },
265
+ stageList: {
266
+ flexDirection: "column"
267
+ },
268
+ stageRow: {
269
+ flexDirection: "row",
270
+ alignItems: "center",
271
+ gap: theme.space[12],
272
+ minHeight: theme.ctl.lg
273
+ },
274
+ dot: {
275
+ flexGrow: 0,
276
+ flexShrink: 0,
277
+ width: theme.space[10],
278
+ height: theme.space[10],
279
+ borderRadius: theme.radius.full,
280
+ variants: {
281
+ status: {
282
+ pending: {
283
+ backgroundColor: theme.color.surface3,
284
+ borderWidth: theme.borderWidth.strong,
285
+ borderColor: theme.color.borderStrong
286
+ },
287
+ active: { backgroundColor: theme.color.accent },
288
+ done: {},
289
+ failed: {}
290
+ }
291
+ }
292
+ },
293
+ stageLabel: {
294
+ flexGrow: 1,
295
+ flexShrink: 1,
296
+ flexBasis: theme.space[0],
297
+ fontFamily: theme.font.sans,
298
+ fontSize: theme.fontSize[14],
299
+ variants: {
300
+ status: {
301
+ pending: { color: theme.color.text2 },
302
+ active: { color: theme.color.text, fontWeight: theme.fontWeight.semibold },
303
+ done: { color: theme.color.text },
304
+ failed: { color: theme.color.text }
305
+ }
306
+ }
307
+ },
308
+ noPipeline: {
309
+ fontFamily: theme.font.sans,
310
+ fontSize: theme.fontSize[13],
311
+ color: theme.color.text2
312
+ },
313
+ footer: {
314
+ marginTop: theme.space[12],
315
+ fontFamily: theme.font.sans,
316
+ fontSize: theme.fontSize[12],
317
+ lineHeight: theme.fontSize[12] * theme.lineHeight.relaxed,
318
+ color: theme.color.text2
319
+ }
320
+ }));
321
+ function Money({
322
+ minor,
323
+ currency,
324
+ emphasis = false
325
+ }) {
326
+ const { styles } = useStyles(bodySheet, { emphasis });
327
+ return /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles.money, children: money(minor, currency) });
328
+ }
329
+ function ResultNote({ children }) {
330
+ const { styles } = useStyles(bodySheet);
331
+ return /* @__PURE__ */ jsx(Text, { style: styles.note, children });
332
+ }
333
+ function Body({
334
+ kind,
335
+ children
336
+ }) {
337
+ const { styles } = useStyles(bodySheet);
338
+ return /* @__PURE__ */ jsx(View, { testID: `loam-result-${kind}`, style: styles.body, children });
339
+ }
340
+ function SpeciesResult({
341
+ result,
342
+ onPickAlternate,
343
+ alternatesLabel,
344
+ labels,
345
+ copy
346
+ }) {
347
+ const t = useCaptureResultLabels(labels);
348
+ const words = useAnalyzerCopy(copy);
349
+ const locale = useLoamLocale();
350
+ const { styles } = useStyles(bodySheet);
351
+ const { top, alternates, facts } = result;
352
+ return /* @__PURE__ */ jsxs(Body, { kind: "species", children: [
353
+ /* @__PURE__ */ jsxs(View, { style: styles.headRow, children: [
354
+ /* @__PURE__ */ jsxs(View, { style: styles.headText, children: [
355
+ /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: styles.heading, children: top.common }),
356
+ /* @__PURE__ */ jsxs(Text, { style: styles.subheading, children: [
357
+ /* @__PURE__ */ jsx(Text, { style: styles.italic, children: top.name }),
358
+ top.family ? ` \xB7 ${top.family}` : ""
359
+ ] })
360
+ ] }),
361
+ /* @__PURE__ */ jsx(ConfidenceBadge, { value: top.confidence, size: "md", labels })
362
+ ] }),
363
+ alternates.length > 0 ? /* @__PURE__ */ jsxs(View, { style: styles.group, children: [
364
+ /* @__PURE__ */ jsx(Text, { style: styles.overline, children: (alternatesLabel ?? t.orPossibly).toLocaleUpperCase(locale) }),
365
+ /* @__PURE__ */ jsx(View, { style: styles.list, children: alternates.map((m) => /* @__PURE__ */ jsx(MatchRow, { match: m, onPick: onPickAlternate, labels }, m.name)) })
366
+ ] }) : null,
367
+ facts.length > 0 ? /* @__PURE__ */ jsx(
368
+ DescriptionList,
369
+ {
370
+ layout: "inline",
371
+ density: "compact",
372
+ dividers: true,
373
+ items: facts.map(([term, description]) => ({ term, description }))
374
+ }
375
+ ) : null,
376
+ /* @__PURE__ */ jsx(ResultNote, { children: words.result.notes.species })
377
+ ] });
378
+ }
379
+ var SEVERITY_VARIANT = {
380
+ none: "good",
381
+ minor: "info",
382
+ moderate: "warn"
383
+ };
384
+ function PanelsResult({
385
+ result,
386
+ currency = "HUF",
387
+ estimateLabel,
388
+ labels,
389
+ copy
390
+ }) {
391
+ const t = useCaptureResultLabels(labels);
392
+ const words = useAnalyzerCopy(copy);
393
+ const locale = useLoamLocale();
394
+ const { styles } = useStyles(bodySheet);
395
+ const { vehicle, findings } = result;
396
+ const [low, high] = estimateRange(findings);
397
+ return /* @__PURE__ */ jsxs(Body, { kind: "panels", children: [
398
+ /* @__PURE__ */ jsxs(View, { style: styles.group, children: [
399
+ /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: styles.heading, children: `${vehicle.year} ${vehicle.make} ${vehicle.model}` }),
400
+ /* @__PURE__ */ jsx(Text, { style: styles.subheading, children: `${vehicle.plate} \xB7 ${vehicle.colour}` }),
401
+ /* @__PURE__ */ jsx(Text, { style: styles.mono, children: vehicle.vin })
402
+ ] }),
403
+ /* @__PURE__ */ jsxs(View, { testID: "loam-estimate", style: styles.estimate, children: [
404
+ /* @__PURE__ */ jsx(Text, { style: styles.overline, children: (estimateLabel ?? t.estimate).toLocaleUpperCase(locale) }),
405
+ /* @__PURE__ */ jsxs(View, { style: styles.estimateRow, children: [
406
+ /* @__PURE__ */ jsx(Money, { minor: low, currency, emphasis: true }),
407
+ /* @__PURE__ */ jsx(Text, { style: styles.dash, children: "\u2013" }),
408
+ /* @__PURE__ */ jsx(Money, { minor: high, currency, emphasis: true })
409
+ ] })
410
+ ] }),
411
+ /* @__PURE__ */ jsx(View, { style: styles.list, children: findings.map((f) => {
412
+ return /* @__PURE__ */ jsxs(View, { style: styles.finding, children: [
413
+ /* @__PURE__ */ jsxs(View, { style: styles.findingTop, children: [
414
+ /* @__PURE__ */ jsx(Text, { style: styles.findingPanel, children: f.panel }),
415
+ /* @__PURE__ */ jsx(Badge, { variant: SEVERITY_VARIANT[f.severity], size: "sm", children: words.result.severity[f.severity] })
416
+ ] }),
417
+ /* @__PURE__ */ jsxs(View, { style: styles.findingBottom, children: [
418
+ /* @__PURE__ */ jsx(Text, { style: styles.findingDamage, children: f.damage }),
419
+ /* @__PURE__ */ jsxs(View, { style: styles.findingMeta, children: [
420
+ /* @__PURE__ */ jsx(Money, { minor: f.cost, currency }),
421
+ /* @__PURE__ */ jsx(ConfidenceBadge, { value: f.confidence, labels })
422
+ ] })
423
+ ] })
424
+ ] }, f.panel);
425
+ }) }),
426
+ /* @__PURE__ */ jsx(ResultNote, { children: words.result.notes.panels })
427
+ ] });
428
+ }
429
+ function FieldRow({
430
+ field,
431
+ onChange,
432
+ labels,
433
+ copy
434
+ }) {
435
+ const words = useAnalyzerCopy(copy);
436
+ const theme = useLoamTheme("capture-result");
437
+ const { styles } = useStyles(bodySheet, { flagged: fieldFlagged(field) });
438
+ const flagged = fieldFlagged(field);
439
+ return /* @__PURE__ */ jsxs(View, { style: styles.group, children: [
440
+ /* @__PURE__ */ jsxs(View, { style: styles.fieldHead, children: [
441
+ /* @__PURE__ */ jsx(Text, { style: styles.fieldLabel, children: field.key }),
442
+ /* @__PURE__ */ jsx(ConfidenceBadge, { value: field.confidence, labels })
443
+ ] }),
444
+ /* @__PURE__ */ jsx(View, { style: styles.fieldInput, children: /* @__PURE__ */ jsx(
445
+ Input,
446
+ {
447
+ size: "md",
448
+ value: field.value,
449
+ editable: !!onChange,
450
+ accessibilityLabel: flagged ? `${field.key}, ${words.result.fieldFlag}` : field.key,
451
+ accessibilityHint: flagged ? words.result.fieldFlag : void 0,
452
+ onChangeText: (next) => onChange?.(field.key, next)
453
+ }
454
+ ) }),
455
+ flagged ? /* @__PURE__ */ jsxs(View, { style: styles.flagChip, children: [
456
+ /* @__PURE__ */ jsx(Icon, { name: "alert-triangle", size: theme.icon.xs, color: theme.color.warnOnSoft }),
457
+ /* @__PURE__ */ jsx(Text, { style: styles.flagText, children: words.result.fieldFlag })
458
+ ] }) : null
459
+ ] });
460
+ }
461
+ function FieldsResult({
462
+ result,
463
+ onFieldChange,
464
+ labels,
465
+ copy
466
+ }) {
467
+ const words = useAnalyzerCopy(copy);
468
+ const { styles } = useStyles(bodySheet);
469
+ return /* @__PURE__ */ jsxs(Body, { kind: "fields", children: [
470
+ /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: styles.heading, children: result.doc }),
471
+ /* @__PURE__ */ jsx(View, { style: styles.fieldList, children: result.fields.map((f) => /* @__PURE__ */ jsx(FieldRow, { field: f, onChange: onFieldChange, labels, copy }, f.key)) }),
472
+ /* @__PURE__ */ jsx(ResultNote, { children: words.result.notes.fields })
473
+ ] });
474
+ }
475
+ function CodeResult({
476
+ result,
477
+ currency = "HUF",
478
+ quantity = 1,
479
+ onQuantityChange,
480
+ quantityLabel: quantityProp,
481
+ labels,
482
+ copy
483
+ }) {
484
+ const t = useCaptureResultLabels(labels);
485
+ const words = useAnalyzerCopy(copy);
486
+ const quantityLabel = quantityProp ?? t.quantity;
487
+ const { styles } = useStyles(bodySheet);
488
+ const { product, format, value } = result;
489
+ const mono = [format, value, product?.sku].filter(Boolean).join(" \xB7 ");
490
+ return /* @__PURE__ */ jsxs(Body, { kind: "code", children: [
491
+ /* @__PURE__ */ jsxs(View, { style: styles.group, children: [
492
+ /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: styles.heading, children: product ? product.name : value }),
493
+ /* @__PURE__ */ jsx(Text, { style: styles.subheading, children: product ? product.stock : t.noProduct })
494
+ ] }),
495
+ product ? /* @__PURE__ */ jsx(Money, { minor: product.price, currency, emphasis: true }) : null,
496
+ onQuantityChange ? /* @__PURE__ */ jsxs(View, { style: styles.quantityRow, children: [
497
+ /* @__PURE__ */ jsx(
498
+ Text,
499
+ {
500
+ accessible: false,
501
+ importantForAccessibility: "no-hide-descendants",
502
+ style: styles.fieldLabel,
503
+ children: quantityLabel
504
+ }
505
+ ),
506
+ /* @__PURE__ */ jsx(
507
+ Stepper,
508
+ {
509
+ value: quantity,
510
+ min: 1,
511
+ accessibilityLabel: quantityLabel,
512
+ onValueChange: onQuantityChange
513
+ }
514
+ )
515
+ ] }) : null,
516
+ /* @__PURE__ */ jsx(Text, { style: styles.mono, children: mono }),
517
+ /* @__PURE__ */ jsx(ResultNote, { children: words.result.notes.code })
518
+ ] });
519
+ }
520
+ function VerdictResult({ result, labels, copy }) {
521
+ const words = useAnalyzerCopy(copy);
522
+ const { styles } = useStyles(bodySheet);
523
+ return /* @__PURE__ */ jsxs(Body, { kind: "verdict", children: [
524
+ /* @__PURE__ */ jsxs(View, { style: styles.headRow, children: [
525
+ /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: styles.heading, children: result.outcome }),
526
+ /* @__PURE__ */ jsx(ConfidenceBadge, { value: result.confidence, size: "md", icon: true, labels })
527
+ ] }),
528
+ /* @__PURE__ */ jsx(
529
+ DescriptionList,
530
+ {
531
+ layout: "stacked",
532
+ density: "compact",
533
+ dividers: true,
534
+ items: result.lines.map(([term, description]) => ({ term, description }))
535
+ }
536
+ ),
537
+ /* @__PURE__ */ jsx(ResultNote, { children: words.result.notes.verdict })
538
+ ] });
539
+ }
540
+ var bodySheet = createStyleSheet((theme) => ({
541
+ body: {
542
+ flexDirection: "column",
543
+ gap: theme.space[16]
544
+ },
545
+ headRow: {
546
+ flexDirection: "row",
547
+ alignItems: "flex-start",
548
+ justifyContent: "space-between",
549
+ gap: theme.space[12]
550
+ },
551
+ headText: {
552
+ flexGrow: 1,
553
+ flexShrink: 1,
554
+ flexBasis: theme.space[0],
555
+ flexDirection: "column",
556
+ gap: theme.space[4]
557
+ },
558
+ heading: {
559
+ fontFamily: theme.font.sans,
560
+ fontSize: theme.type.title3.fontSize,
561
+ fontWeight: theme.fontWeight.semibold,
562
+ color: theme.color.text
563
+ },
564
+ subheading: {
565
+ fontFamily: theme.font.sans,
566
+ fontSize: theme.fontSize[13],
567
+ color: theme.color.text2
568
+ },
569
+ italic: {
570
+ fontStyle: "italic"
571
+ },
572
+ mono: {
573
+ fontFamily: theme.font.mono,
574
+ fontSize: theme.fontSize[12],
575
+ color: theme.color.text2
576
+ },
577
+ overline: {
578
+ fontFamily: theme.font.sans,
579
+ fontSize: theme.fontSize[10],
580
+ letterSpacing: theme.tracking.caps,
581
+ color: theme.color.text3
582
+ },
583
+ group: {
584
+ flexDirection: "column",
585
+ gap: theme.space[6]
586
+ },
587
+ list: {
588
+ flexDirection: "column",
589
+ gap: theme.space[6]
590
+ },
591
+ fieldList: {
592
+ flexDirection: "column",
593
+ gap: theme.space[12]
594
+ },
595
+ note: {
596
+ fontFamily: theme.font.sans,
597
+ fontSize: theme.fontSize[12],
598
+ lineHeight: theme.fontSize[12] * theme.lineHeight.relaxed,
599
+ color: theme.color.text2
600
+ },
601
+ money: {
602
+ fontFamily: theme.font.sans,
603
+ fontVariant: ["tabular-nums"],
604
+ color: theme.color.text,
605
+ variants: {
606
+ emphasis: {
607
+ true: { fontSize: theme.fontSize[20], fontWeight: theme.fontWeight.semibold },
608
+ false: { fontSize: theme.fontSize[13] }
609
+ }
610
+ }
611
+ },
612
+ estimate: {
613
+ flexDirection: "column",
614
+ gap: theme.space[4],
615
+ padding: theme.space[8],
616
+ borderRadius: theme.radius.md,
617
+ backgroundColor: theme.color.surface2,
618
+ borderWidth: theme.borderWidth.base,
619
+ borderColor: theme.color.border
620
+ },
621
+ estimateRow: {
622
+ flexDirection: "row",
623
+ alignItems: "baseline",
624
+ flexWrap: "wrap",
625
+ gap: theme.space[6]
626
+ },
627
+ dash: {
628
+ fontFamily: theme.font.sans,
629
+ fontSize: theme.fontSize[15],
630
+ color: theme.color.text3
631
+ },
632
+ finding: {
633
+ flexDirection: "column",
634
+ gap: theme.space[6],
635
+ paddingVertical: theme.space[12],
636
+ borderBottomWidth: theme.borderWidth.base,
637
+ borderBottomColor: theme.color.border
638
+ },
639
+ findingTop: {
640
+ flexDirection: "row",
641
+ alignItems: "flex-start",
642
+ justifyContent: "space-between",
643
+ gap: theme.space[12]
644
+ },
645
+ findingPanel: {
646
+ flexShrink: 1,
647
+ fontFamily: theme.font.sans,
648
+ fontSize: theme.fontSize[13],
649
+ fontWeight: theme.fontWeight.semibold,
650
+ color: theme.color.text
651
+ },
652
+ findingBottom: {
653
+ flexDirection: "row",
654
+ alignItems: "center",
655
+ justifyContent: "space-between",
656
+ gap: theme.space[12]
657
+ },
658
+ findingDamage: {
659
+ flexShrink: 1,
660
+ fontFamily: theme.font.sans,
661
+ fontSize: theme.fontSize[13],
662
+ color: theme.color.text2
663
+ },
664
+ findingMeta: {
665
+ flexGrow: 0,
666
+ flexShrink: 0,
667
+ flexDirection: "row",
668
+ alignItems: "center",
669
+ gap: theme.space[8]
670
+ },
671
+ fieldHead: {
672
+ flexDirection: "row",
673
+ alignItems: "baseline",
674
+ justifyContent: "space-between",
675
+ gap: theme.space[8]
676
+ },
677
+ fieldLabel: {
678
+ fontFamily: theme.font.sans,
679
+ fontSize: theme.fontSize[12],
680
+ fontWeight: theme.fontWeight.semibold,
681
+ color: theme.color.text2
682
+ },
683
+ // A warn *edge*, not a warn fill: the value stays on the field surface its
684
+ // ink was measured against, and the flag says the rest in words.
685
+ fieldInput: {
686
+ borderRadius: theme.ctl.r.sm,
687
+ variants: {
688
+ flagged: {
689
+ true: { borderWidth: theme.borderWidth.base, borderColor: theme.color.warn },
690
+ false: {}
691
+ }
692
+ }
693
+ },
694
+ flagChip: {
695
+ alignSelf: "flex-start",
696
+ flexDirection: "row",
697
+ alignItems: "center",
698
+ gap: theme.space[4],
699
+ paddingHorizontal: theme.space[8],
700
+ paddingVertical: theme.space[2],
701
+ borderRadius: theme.radius.full,
702
+ backgroundColor: theme.color.warnSoft,
703
+ borderWidth: theme.borderWidth.base,
704
+ borderColor: theme.edge.warn
705
+ },
706
+ flagText: {
707
+ fontFamily: theme.font.sans,
708
+ fontSize: theme.fontSize[12],
709
+ color: theme.color.warnOnSoft
710
+ },
711
+ quantityRow: {
712
+ flexDirection: "row",
713
+ alignItems: "center",
714
+ justifyContent: "space-between",
715
+ gap: theme.space[12]
716
+ }
717
+ }));
718
+ var NOOP = () => void 0;
719
+ function FailureCard({
720
+ failure: failure$1 = "low_confidence",
721
+ alternates = [],
722
+ onRetake,
723
+ onManualEntry,
724
+ onPickAlternate,
725
+ alternatesLabel: alternatesProp,
726
+ manualLabel: manualProp,
727
+ announce = true,
728
+ labels,
729
+ copy,
730
+ tone = "danger",
731
+ variant = "elevated",
732
+ elevation = "default",
733
+ padding = "md",
734
+ loading = false,
735
+ interactive = false,
736
+ onPress,
737
+ accessibilityLabel
738
+ }) {
739
+ const t = useCaptureResultLabels(labels);
740
+ const words = useAnalyzerCopy(copy);
741
+ const locale = useLoamLocale();
742
+ const alternatesLabel = alternatesProp ?? t.closestWeGot;
743
+ const manualLabel = manualProp ?? words.failure.enterManually;
744
+ const { styles } = useStyles(failureSheet);
745
+ const theme = useLoamTheme("capture-result");
746
+ const base = failure(failure$1);
747
+ const resolved = { ...base, ...words.failures[base.id] };
748
+ const body = failureBody(resolved.id, words);
749
+ const showAlternates = resolved.id === "low_confidence" && alternates.length > 0;
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
+ ) });
792
+ }
793
+ var failureSheet = createStyleSheet((theme) => ({
794
+ card: {
795
+ width: "100%",
796
+ maxWidth: theme.panel.lg
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] },
803
+ headRow: {
804
+ flexDirection: "row",
805
+ alignItems: "flex-start",
806
+ gap: theme.space[12]
807
+ },
808
+ toneMark: {
809
+ flexGrow: 0,
810
+ flexShrink: 0,
811
+ width: theme.space[32],
812
+ height: theme.space[32],
813
+ alignItems: "center",
814
+ justifyContent: "center",
815
+ borderRadius: theme.radius.full,
816
+ backgroundColor: theme.color.warnSoft,
817
+ borderWidth: theme.borderWidth.base,
818
+ borderColor: theme.edge.warn
819
+ },
820
+ headText: {
821
+ flexGrow: 1,
822
+ flexShrink: 1,
823
+ flexBasis: theme.space[0],
824
+ flexDirection: "column",
825
+ gap: theme.space[4]
826
+ },
827
+ heading: {
828
+ fontFamily: theme.font.sans,
829
+ fontSize: theme.type.title3.fontSize,
830
+ fontWeight: theme.fontWeight.semibold,
831
+ color: theme.color.text
832
+ },
833
+ body: {
834
+ fontFamily: theme.font.sans,
835
+ fontSize: theme.fontSize[15],
836
+ lineHeight: theme.fontSize[15] * theme.lineHeight.relaxed,
837
+ color: theme.color.text2
838
+ },
839
+ stack: {
840
+ flexDirection: "column",
841
+ gap: theme.space[12]
842
+ },
843
+ group: {
844
+ flexDirection: "column",
845
+ gap: theme.space[6]
846
+ },
847
+ list: {
848
+ flexDirection: "column",
849
+ gap: theme.space[6]
850
+ },
851
+ overline: {
852
+ fontFamily: theme.font.sans,
853
+ fontSize: theme.fontSize[10],
854
+ letterSpacing: theme.tracking.caps,
855
+ color: theme.color.text3
856
+ },
857
+ // Shared row when both labels fit, a full-width stack when they do not —
858
+ // never a label broken across two lines inside its own button.
859
+ actions: {
860
+ flexDirection: "row",
861
+ flexWrap: "wrap",
862
+ alignItems: "center",
863
+ gap: theme.space[8],
864
+ width: "100%"
865
+ },
866
+ actionSlot: {
867
+ flexGrow: 1,
868
+ flexShrink: 0,
869
+ flexBasis: "auto"
870
+ }
871
+ }));
872
+ var SCRIM = {
873
+ captured: "a6",
874
+ done: "a7",
875
+ result: "a8",
876
+ analysing: "a10",
877
+ failure: "a11",
878
+ none: null
879
+ };
880
+ function CapturePreview({
881
+ preview,
882
+ label,
883
+ scrim = "captured",
884
+ pill: pillProp,
885
+ labels,
886
+ copy,
887
+ tracking,
888
+ announce = true,
889
+ size = "md",
890
+ motion,
891
+ children,
892
+ tone,
893
+ loading = false
894
+ }) {
895
+ const theme = useLoamTheme("capture-result");
896
+ const { styles } = useStyles(reviewSheet);
897
+ const t = useCaptureResultLabels(labels);
898
+ const words = useAnalyzerCopy(copy);
899
+ const pill = pillProp === void 0 ? words.capturedPill : pillProp;
900
+ const stop = SCRIM[scrim];
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
+ );
929
+ }
930
+ function RetakeBar({
931
+ analyse = true,
932
+ retakeLabel: retakeProp,
933
+ acceptLabel,
934
+ labels,
935
+ onRetake,
936
+ onAccept,
937
+ size = "lg",
938
+ density = "standard",
939
+ orientation = "horizontal",
940
+ variant = "glass",
941
+ tone,
942
+ loading = false
943
+ }) {
944
+ const t = useCaptureResultLabels(labels);
945
+ const retakeLabel = retakeProp ?? t.retake;
946
+ const theme = useLoamTheme("capture-result");
947
+ const { styles } = useStyles(reviewSheet);
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
+ );
981
+ }
982
+ var FROZEN_PHASES = [
983
+ "captured",
984
+ "analysing",
985
+ "result",
986
+ "failure",
987
+ "done"
988
+ ];
989
+ var reviewSheet = createStyleSheet((theme) => ({
990
+ frozen: {
991
+ position: "absolute",
992
+ top: theme.space[0],
993
+ bottom: theme.space[0],
994
+ left: theme.space[0],
995
+ right: theme.space[0],
996
+ overflow: "hidden"
997
+ },
998
+ scrim: {
999
+ pointerEvents: "none",
1000
+ position: "absolute",
1001
+ top: theme.space[0],
1002
+ bottom: theme.space[0],
1003
+ left: theme.space[0],
1004
+ right: theme.space[0]
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
+ },
1014
+ pillRow: {
1015
+ pointerEvents: "box-none",
1016
+ position: "absolute",
1017
+ top: theme.space[0],
1018
+ left: theme.space[0],
1019
+ right: theme.space[0],
1020
+ alignItems: "center",
1021
+ padding: theme.space[8]
1022
+ },
1023
+ pillRowLg: { padding: theme.space[16] },
1024
+ retakeBar: {
1025
+ width: "100%",
1026
+ flexDirection: "row",
1027
+ flexWrap: "wrap",
1028
+ alignItems: "center",
1029
+ gap: theme.space[8]
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 },
1035
+ // Floored at their labels' widths and the bar wraps, so no label breaks
1036
+ // inside its button; when both fit, accept keeps the 2:1 share.
1037
+ retakeSlot: {
1038
+ flexGrow: 1,
1039
+ flexShrink: 0,
1040
+ flexBasis: "auto"
1041
+ },
1042
+ acceptSlot: {
1043
+ flexGrow: 2,
1044
+ flexShrink: 0,
1045
+ flexBasis: "auto"
1046
+ },
1047
+ glassAction: {
1048
+ height: theme.ctl.lg,
1049
+ alignItems: "center",
1050
+ justifyContent: "center",
1051
+ paddingHorizontal: theme.ctl.px.lg,
1052
+ borderRadius: theme.ctl.r.lg,
1053
+ backgroundColor: theme.black.a12,
1054
+ borderWidth: theme.borderWidth.base,
1055
+ borderColor: theme.white.a5
1056
+ },
1057
+ glassActionLabel: {
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
1061
+ }
1062
+ }));
1063
+ function ResultCard({
1064
+ result,
1065
+ profile: profileProp,
1066
+ currency = "HUF",
1067
+ quantity = 1,
1068
+ onFieldChange,
1069
+ onPickAlternate,
1070
+ onQuantityChange,
1071
+ labels,
1072
+ copy,
1073
+ tone,
1074
+ variant = "plain",
1075
+ elevation = "default",
1076
+ padding,
1077
+ loading = false,
1078
+ interactive = false,
1079
+ onPress,
1080
+ accessibilityLabel
1081
+ }) {
1082
+ const stamp = typeof profileProp === "string" ? profileProp : profileProp ? profileProp.id : void 0;
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
+ );
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
+ }));
1169
+ function ResultSheet({
1170
+ title: titleProp,
1171
+ primaryLabel: primaryProp,
1172
+ scanAnotherLabel: scanProp,
1173
+ labels,
1174
+ copy,
1175
+ onScanAnother,
1176
+ onKeep,
1177
+ onDismiss,
1178
+ autoFocus = true,
1179
+ maxHeight: maxHeightProp,
1180
+ tone,
1181
+ size = "md",
1182
+ presentation = "overlay",
1183
+ side = "bottom",
1184
+ loading = false,
1185
+ dismissRatio = 0.3,
1186
+ grabberLabel: grabberProp,
1187
+ morphFrom,
1188
+ children
1189
+ }) {
1190
+ const t = useCaptureResultLabels(labels);
1191
+ const words = useAnalyzerCopy(copy);
1192
+ const title = titleProp ?? t.result;
1193
+ const primaryLabel = primaryProp ?? resultPrimaryLabel("plant", 0, words);
1194
+ const scanAnotherLabel = scanProp ?? t.scanAnother;
1195
+ const grabberLabel = grabberProp ?? t.dismissResult;
1196
+ const theme = useLoamTheme("capture-result");
1197
+ const { styles } = useStyles(sheetSheet);
1198
+ const panel = React5.useRef(null);
1199
+ const height = React5.useRef(0);
1200
+ const offset = React5.useRef(new Animated.Value(0)).current;
1201
+ const maxHeight = maxHeightProp ?? (size === "sm" ? "60%" : size === "lg" ? "94%" : "82%");
1202
+ const level = useResolvedMotion(void 0, "capture-result");
1203
+ const enter = React5.useRef(new Animated.Value(0)).current;
1204
+ const [sheetH, setSheetH] = React5.useState(600);
1205
+ const [startDy, setStartDy] = React5.useState(null);
1206
+ const entered = React5.useRef(false);
1207
+ const themeRef = React5.useRef(theme);
1208
+ themeRef.current = theme;
1209
+ const levelRef = React5.useRef(level);
1210
+ levelRef.current = level;
1211
+ const dismiss = React5.useRef(onDismiss);
1212
+ dismiss.current = onDismiss;
1213
+ const dir = side === "top" ? -1 : 1;
1214
+ const dirRef = React5.useRef(dir);
1215
+ dirRef.current = dir;
1216
+ const ratio = React5.useRef(dismissRatio);
1217
+ ratio.current = dismissRatio;
1218
+ React5.useLayoutEffect(() => {
1219
+ if (!autoFocus) return;
1220
+ const node = panel.current;
1221
+ if (!node || Platform.OS === "web") return;
1222
+ const tag = findNodeHandle(node);
1223
+ if (tag !== null) AccessibilityInfo.setAccessibilityFocus(tag);
1224
+ }, [autoFocus]);
1225
+ const grabberSlop = Math.max(0, (theme.hit.lg - theme.space[24]) / 2);
1226
+ const pan = React5.useRef(
1227
+ // eslint-disable-next-line loam/no-pan-responder
1228
+ PanResponder.create({
1229
+ onStartShouldSetPanResponder: () => true,
1230
+ onMoveShouldSetPanResponder: (_e, g) => Math.abs(g.dy) > 2,
1231
+ onPanResponderMove: (_e, g) => {
1232
+ if (!dismiss.current) return;
1233
+ offset.setValue(dirRef.current * Math.max(0, dirRef.current * g.dy));
1234
+ },
1235
+ onPanResponderRelease: (_e, g) => {
1236
+ if (dismiss.current && height.current > 0 && Math.max(0, dirRef.current * g.dy) > height.current * ratio.current) {
1237
+ offset.setValue(0);
1238
+ dismiss.current();
1239
+ return;
1240
+ }
1241
+ if (levelRef.current === "full") {
1242
+ Animated.spring(offset, {
1243
+ ...springConfig(themeRef.current, "ds", {
1244
+ velocity: dirRef.current * g.vy,
1245
+ thrown: true
1246
+ }),
1247
+ toValue: 0,
1248
+ useNativeDriver: true
1249
+ }).start();
1250
+ } else {
1251
+ offset.setValue(0);
1252
+ }
1253
+ },
1254
+ onPanResponderTerminate: () => offset.setValue(0)
1255
+ })
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 }) });
1270
+ return /* @__PURE__ */ jsxs(
1271
+ Animated.View,
1272
+ {
1273
+ ref: panel,
1274
+ role: "dialog",
1275
+ accessibilityViewIsModal: true,
1276
+ accessibilityLabel: title,
1277
+ testID: "loam-result-sheet",
1278
+ "aria-busy": loading || void 0,
1279
+ onLayout: (e) => {
1280
+ height.current = e.nativeEvent.layout.height;
1281
+ if (entered.current) return;
1282
+ entered.current = true;
1283
+ setSheetH(height.current);
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));
1304
+ Animated.timing(enter, {
1305
+ toValue: 1,
1306
+ duration: theme.motion.expand.duration,
1307
+ easing: Easing.bezier(...theme.motion.expand.easing),
1308
+ useNativeDriver: true
1309
+ }).start();
1310
+ });
1311
+ },
1312
+ style: [
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,
1317
+ {
1318
+ maxHeight,
1319
+ opacity: level !== "full" ? enter : startDy === null ? 1 : enter.interpolate({
1320
+ inputRange: [0, 0.3],
1321
+ outputRange: [0, 1],
1322
+ extrapolate: "clamp"
1323
+ }),
1324
+ transform: [
1325
+ { translateY: offset },
1326
+ ...level === "full" ? [
1327
+ {
1328
+ translateY: enter.interpolate({
1329
+ inputRange: [0, 1],
1330
+ outputRange: [startDy ?? dir * sheetH, 0]
1331
+ })
1332
+ }
1333
+ ] : []
1334
+ ]
1335
+ }
1336
+ ],
1337
+ children: [
1338
+ side === "top" ? null : grabber,
1339
+ /* @__PURE__ */ jsx(ScrollView, { style: styles.body, contentContainerStyle: styles.bodyContent, focusable: true, children }),
1340
+ /* @__PURE__ */ jsxs(View, { style: styles.actions, children: [
1341
+ /* @__PURE__ */ jsx(View, { style: styles.secondarySlot, children: /* @__PURE__ */ jsx(Button, { variant: "outline", size: "lg", fullWidth: true, onPress: onScanAnother, children: scanAnotherLabel }) }),
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
1345
+ ]
1346
+ }
1347
+ );
1348
+ }
1349
+ var sheetSheet = createStyleSheet((theme) => ({
1350
+ sheet: {
1351
+ position: "absolute",
1352
+ left: theme.space[0],
1353
+ right: theme.space[0],
1354
+ bottom: theme.space[0],
1355
+ zIndex: theme.z.modal,
1356
+ flexDirection: "column",
1357
+ overflow: "hidden",
1358
+ borderTopLeftRadius: theme.radius.xl,
1359
+ borderTopRightRadius: theme.radius.xl,
1360
+ borderTopWidth: theme.borderWidth.base,
1361
+ borderTopColor: theme.color.border,
1362
+ backgroundColor: theme.color.surface,
1363
+ ...theme.shadow.lg
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
+ },
1377
+ grabberHit: {
1378
+ width: "100%",
1379
+ height: theme.space[24],
1380
+ flexGrow: 0,
1381
+ flexShrink: 0,
1382
+ alignItems: "center",
1383
+ justifyContent: "center"
1384
+ },
1385
+ grabber: {
1386
+ width: theme.space[36],
1387
+ height: theme.layout.sheetGrabber,
1388
+ borderRadius: theme.radius.full,
1389
+ backgroundColor: theme.color.text3
1390
+ },
1391
+ body: {
1392
+ flexGrow: 1,
1393
+ flexShrink: 1,
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"
1396
+ },
1397
+ bodyContent: {
1398
+ paddingHorizontal: theme.space[16],
1399
+ paddingBottom: theme.space[12]
1400
+ },
1401
+ actions: {
1402
+ flexGrow: 0,
1403
+ flexShrink: 0,
1404
+ flexDirection: "row",
1405
+ flexWrap: "wrap",
1406
+ alignItems: "center",
1407
+ gap: theme.space[8],
1408
+ paddingHorizontal: theme.space[16],
1409
+ paddingVertical: theme.space[12],
1410
+ borderTopWidth: theme.borderWidth.base,
1411
+ borderTopColor: theme.color.border
1412
+ },
1413
+ // Both slots are floored at their own label's width and the row wraps, so a
1414
+ // label never breaks inside its button ("Save to collection" did at 140pt);
1415
+ // when both fit, the primary still takes two thirds of the spare width.
1416
+ secondarySlot: {
1417
+ flexGrow: 1,
1418
+ flexShrink: 0,
1419
+ flexBasis: "auto"
1420
+ },
1421
+ primarySlot: {
1422
+ flexGrow: 2,
1423
+ flexShrink: 0,
1424
+ flexBasis: "auto"
1425
+ }
1426
+ }));
1427
+
1428
+ export { AnalysisProgress, CapturePreview, CodeResult, FROZEN_PHASES, FailureCard, FieldsResult, PanelsResult, ResultCard, ResultSheet, RetakeBar, ScanSweep, SpeciesResult, StageBadge, StageRow, VerdictResult };