@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,2535 @@
1
+ import { camInk, useViewfinderLabels, camToneColour, BusySpinner, busyProps, busyStyle, useAnalyzerCopy, HintTrail, camToneEdge, GlassIconButton, decorativeProps, untabbableProps, PillRemoveButton, disabledProps, useEnterFade, disabledStyle, camGlass, camMeta, pressedProps } from './chunk-OCHPK5YV.js';
2
+ import { Badge } from './chunk-LGNTP5XA.js';
3
+ import { isAndroidIdiom } from './chunk-TH4PW2WU.js';
4
+ import { useLoamLocale } from './chunk-APCWFOZW.js';
5
+ import { Icon } from './chunk-PCEFCOLN.js';
6
+ import { useReducedMotion } from './chunk-J64KGCGX.js';
7
+ import * as React3 from 'react';
8
+ import { Animated, View, Text, Pressable, Easing, Dimensions, ScrollView } from 'react-native';
9
+ import Svg2, { Path, Circle, Defs, LinearGradient, Stop, Rect, Mask, Line } from 'react-native-svg';
10
+ import { createStyleSheet, useLoamTheme, useStyles } from '@btndprojects/loam-theme-native';
11
+ import { TRACK_BAND_BOTTOM, confidenceTone, TRACKING_MOTION, confidenceLabel, trackCountLabel, trackTone, chipRoom, chipAnchor, chipSlot, visibleChips, MAX_CHIPS, trackingSummaryLabel, highlightWeight, contourPath, boxPath, readBatchLabel } from '@btndprojects/loam-analyzer';
12
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
13
+
14
+ var RING_R = 46;
15
+ var RING_C = 2 * Math.PI * RING_R;
16
+ var RING_STROKE = 6;
17
+ function CountdownRing({
18
+ value,
19
+ label,
20
+ labels,
21
+ tone = "neutral",
22
+ size = "md",
23
+ variant = "ring",
24
+ loading = false,
25
+ motion = "full"
26
+ }) {
27
+ const t = useViewfinderLabels(labels);
28
+ const theme = useLoamTheme("viewfinder");
29
+ const reduced = useReducedMotion();
30
+ const { styles } = useStyles(controlSheet);
31
+ const pct2 = Math.min(100, Math.max(0, value));
32
+ const still = reduced || theme.reduceMotion || motion !== "full" || variant === "number";
33
+ const accent = camToneColour(theme, tone) ?? theme.color.good;
34
+ const stroke = size === "sm" ? RING_STROKE - 2 : size === "lg" ? RING_STROKE + 2 : RING_STROKE;
35
+ return /* @__PURE__ */ jsx(
36
+ View,
37
+ {
38
+ accessibilityRole: "progressbar",
39
+ role: "progressbar",
40
+ accessibilityLabel: label ?? t.autoCapturing,
41
+ accessibilityValue: loading ? void 0 : { min: 0, max: 100, now: Math.round(pct2) },
42
+ style: styles.ringRoot,
43
+ ...{
44
+ "aria-valuenow": loading ? void 0 : Math.round(pct2),
45
+ "aria-valuemin": 0,
46
+ "aria-valuemax": 100
47
+ },
48
+ ...busyProps(loading),
49
+ children: loading ? /* @__PURE__ */ jsx(BusySpinner, { color: accent }) : still ? /* @__PURE__ */ jsx(Text, { style: [styles.ringNumber, { color: accent }], children: String(Math.round(pct2)) }) : /* @__PURE__ */ jsx(Svg2, { width: "100%", height: "100%", viewBox: "0 0 100 100", children: /* @__PURE__ */ jsx(
50
+ Circle,
51
+ {
52
+ cx: 50,
53
+ cy: 50,
54
+ r: RING_R,
55
+ stroke: accent,
56
+ strokeWidth: stroke,
57
+ strokeLinecap: "round",
58
+ strokeDasharray: RING_C,
59
+ strokeDashoffset: RING_C * (1 - pct2 / 100),
60
+ fill: "none",
61
+ transform: "rotate(-90 50 50)"
62
+ }
63
+ ) })
64
+ }
65
+ );
66
+ }
67
+ function ShutterButton({
68
+ enabled = true,
69
+ mode = "manual",
70
+ platform = "web",
71
+ countdown = null,
72
+ blockedToast,
73
+ label,
74
+ labels,
75
+ onPress,
76
+ onBlocked,
77
+ variant = "solid",
78
+ size = "md",
79
+ tone = "neutral",
80
+ motion = "full",
81
+ loading = false,
82
+ leading,
83
+ trailing,
84
+ fullWidth = false
85
+ }) {
86
+ const t = useViewfinderLabels(labels);
87
+ const theme = useLoamTheme("viewfinder");
88
+ const { styles } = useStyles(controlSheet, { platform, enabled });
89
+ const outline = variant === "outline" && enabled;
90
+ const glyphColour = enabled && !outline ? theme.media.onInk : camInk(theme);
91
+ const accent = enabled ? camToneColour(theme, tone) : void 0;
92
+ const base = { ios: theme.space[72], android: theme.space[68], web: theme.space[64] }[platform] + theme.space[2];
93
+ const diameter = size === "sm" ? base - theme.space[8] : size === "lg" ? base + theme.space[8] : base;
94
+ const still = motion !== "full" || theme.reduceMotion;
95
+ if (mode === "continuous") return null;
96
+ const shutter = /* @__PURE__ */ jsxs(
97
+ Pressable,
98
+ {
99
+ accessibilityRole: "button",
100
+ accessibilityLabel: label ?? t.capture,
101
+ accessibilityState: { disabled: !enabled },
102
+ testID: enabled ? "loam-shutter-open" : "loam-shutter-blocked",
103
+ style: ({ pressed }) => [
104
+ styles.shutter,
105
+ size === "md" ? null : { width: diameter, height: diameter },
106
+ accent ? { borderColor: accent } : null,
107
+ pressed && !still && !loading ? { opacity: theme.state.pressedOpacity } : null,
108
+ busyStyle(theme, loading)
109
+ ],
110
+ ...busyProps(loading),
111
+ onPress: () => {
112
+ if (loading) return;
113
+ if (!enabled) {
114
+ onBlocked?.(blockedToast ?? "");
115
+ return;
116
+ }
117
+ onPress?.();
118
+ },
119
+ children: [
120
+ /* @__PURE__ */ jsx(
121
+ View,
122
+ {
123
+ style: [
124
+ styles.shutterFill,
125
+ outline ? { backgroundColor: theme.black.a12, borderWidth: theme.borderWidth.base, borderColor: theme.white.a5 } : null
126
+ ],
127
+ children: loading ? /* @__PURE__ */ jsx(BusySpinner, { color: glyphColour }) : /* @__PURE__ */ jsx(
128
+ Icon,
129
+ {
130
+ name: enabled ? "circle" : "lock",
131
+ size: enabled ? theme.icon.lg : theme.icon.md,
132
+ color: glyphColour
133
+ }
134
+ )
135
+ }
136
+ ),
137
+ typeof countdown === "number" ? /* @__PURE__ */ jsx(CountdownRing, { value: countdown, labels }) : null
138
+ ]
139
+ }
140
+ );
141
+ if (!leading && !trailing && !fullWidth) return shutter;
142
+ const side = (name, end) => {
143
+ if (!name && !fullWidth) return null;
144
+ return /* @__PURE__ */ jsx(
145
+ View,
146
+ {
147
+ "aria-hidden": true,
148
+ testID: end ? "loam-shutter-trailing" : "loam-shutter-leading",
149
+ style: fullWidth ? { flex: 1, alignItems: end ? "flex-end" : "flex-start" } : null,
150
+ children: name ? /* @__PURE__ */ jsx(Icon, { name, size: theme.icon.lg, color: camInk(theme) }) : null
151
+ }
152
+ );
153
+ };
154
+ return /* @__PURE__ */ jsxs(
155
+ View,
156
+ {
157
+ testID: "loam-shutter-row",
158
+ style: [
159
+ { flexDirection: "row", alignItems: "center", gap: theme.space[16] },
160
+ fullWidth ? { alignSelf: "stretch", justifyContent: "space-between" } : null
161
+ ],
162
+ children: [
163
+ side(leading, false),
164
+ shutter,
165
+ side(trailing, true)
166
+ ]
167
+ }
168
+ );
169
+ }
170
+ function ContinuousNotice({
171
+ text,
172
+ copy,
173
+ tone = "neutral",
174
+ variant = "glass",
175
+ dismissible = false,
176
+ onDismiss,
177
+ action,
178
+ icon = "barcode",
179
+ size = "md",
180
+ motion = "full",
181
+ loading = false
182
+ }) {
183
+ const words = useAnalyzerCopy(copy);
184
+ const t = useViewfinderLabels();
185
+ const theme = useLoamTheme("viewfinder");
186
+ const reduced = useReducedMotion();
187
+ const { styles } = useStyles(controlSheet);
188
+ const accent = camToneColour(theme, tone);
189
+ const solid = variant === "solid";
190
+ const ink = solid ? theme.media.onInk : camInk(theme);
191
+ const iconColour = solid ? ink : accent ?? ink;
192
+ const fade = React3.useRef(new Animated.Value(0)).current;
193
+ const still = motion !== "full" || reduced || theme.reduceMotion;
194
+ React3.useEffect(() => {
195
+ if (still) {
196
+ fade.setValue(1);
197
+ return;
198
+ }
199
+ Animated.timing(fade, {
200
+ toValue: 1,
201
+ duration: theme.motion.swap.duration,
202
+ easing: Easing.bezier(...theme.motion.swap.easing),
203
+ useNativeDriver: true
204
+ }).start();
205
+ }, [still, fade, theme.motion.swap.duration, theme.motion.swap.easing]);
206
+ return /* @__PURE__ */ jsxs(
207
+ Animated.View,
208
+ {
209
+ testID: "loam-continuous-notice",
210
+ style: [
211
+ styles.notice,
212
+ size === "sm" ? { minHeight: theme.ctl.sm, paddingVertical: theme.space[4] } : null,
213
+ solid ? { backgroundColor: accent ?? theme.media.ink, borderColor: accent ?? theme.media.ink } : camToneEdge(theme, tone),
214
+ variant === "outline" ? { backgroundColor: "transparent" } : null,
215
+ { opacity: still ? 1 : fade },
216
+ busyStyle(theme, false)
217
+ ],
218
+ ...busyProps(loading),
219
+ children: [
220
+ loading ? /* @__PURE__ */ jsx(BusySpinner, { color: iconColour }) : icon ? /* @__PURE__ */ jsx(Icon, { name: icon, size: theme.icon.sm, color: iconColour }) : null,
221
+ /* @__PURE__ */ jsx(
222
+ Text,
223
+ {
224
+ style: [
225
+ styles.noticeText,
226
+ size === "sm" ? { fontSize: theme.fontSize[12] } : null,
227
+ { color: ink }
228
+ ],
229
+ children: text ?? words.continuousNotice
230
+ }
231
+ ),
232
+ /* @__PURE__ */ jsx(
233
+ HintTrail,
234
+ {
235
+ action,
236
+ dismissible: dismissible || onDismiss != null,
237
+ onDismiss,
238
+ label: t.dismiss
239
+ }
240
+ )
241
+ ]
242
+ }
243
+ );
244
+ }
245
+ function TorchToggle({
246
+ on = false,
247
+ available = true,
248
+ label,
249
+ labels,
250
+ onChange,
251
+ variant,
252
+ size,
253
+ disabled,
254
+ loading,
255
+ tone
256
+ }) {
257
+ const t = useViewfinderLabels(labels);
258
+ if (!available) return null;
259
+ return /* @__PURE__ */ jsx(
260
+ GlassIconButton,
261
+ {
262
+ icon: "flash",
263
+ label: label ?? t.torch,
264
+ on,
265
+ variant,
266
+ size,
267
+ disabled,
268
+ loading,
269
+ tone,
270
+ onPress: () => onChange?.(!on)
271
+ }
272
+ );
273
+ }
274
+ function ViewfinderGridToggle({
275
+ on = false,
276
+ label,
277
+ labels,
278
+ onChange,
279
+ variant,
280
+ size,
281
+ disabled,
282
+ loading,
283
+ tone
284
+ }) {
285
+ const t = useViewfinderLabels(labels);
286
+ return /* @__PURE__ */ jsx(
287
+ GlassIconButton,
288
+ {
289
+ icon: "grid",
290
+ label: label ?? t.grid,
291
+ on,
292
+ variant,
293
+ size,
294
+ disabled,
295
+ loading,
296
+ tone,
297
+ onPress: () => onChange?.(!on)
298
+ }
299
+ );
300
+ }
301
+ function FlipButton({
302
+ label,
303
+ labels,
304
+ disabled = false,
305
+ onFlip,
306
+ variant,
307
+ size,
308
+ loading,
309
+ leadingIcon = "flip",
310
+ tone,
311
+ motion,
312
+ trailingIcon,
313
+ fullWidth
314
+ }) {
315
+ const t = useViewfinderLabels(labels);
316
+ return /* @__PURE__ */ jsx(
317
+ GlassIconButton,
318
+ {
319
+ icon: leadingIcon,
320
+ label: label ?? t.flipCamera,
321
+ disabled,
322
+ variant,
323
+ size,
324
+ loading,
325
+ tone,
326
+ motion,
327
+ trailingIcon,
328
+ fullWidth,
329
+ onPress: onFlip
330
+ }
331
+ );
332
+ }
333
+ function LensStop({
334
+ stop,
335
+ on,
336
+ onPick,
337
+ labels,
338
+ size = "md",
339
+ disabled = false
340
+ }) {
341
+ const t = useViewfinderLabels(labels);
342
+ const theme = useLoamTheme("viewfinder");
343
+ const { styles } = useStyles(controlSheet, { on });
344
+ return /* @__PURE__ */ jsx(
345
+ Pressable,
346
+ {
347
+ accessibilityRole: "button",
348
+ accessibilityLabel: t.zoomStop(stop),
349
+ accessibilityState: { selected: on, ...disabled ? { disabled: true } : null },
350
+ disabled,
351
+ style: [styles.lensStop, { width: theme.ctl[size], height: theme.ctl[size] }],
352
+ hitSlop: Math.max(0, (theme.hit.lg - theme.ctl[size]) / 2),
353
+ onPress: onPick,
354
+ ...pressedProps(on),
355
+ children: /* @__PURE__ */ jsx(Text, { style: [styles.lensLabel, { color: on ? theme.media.onInk : camInk(theme) }], children: t.zoomStop(stop) })
356
+ }
357
+ );
358
+ }
359
+ function LensPicker({
360
+ stops = [2, 1, 0.5],
361
+ value = 1,
362
+ label,
363
+ labels,
364
+ onChange,
365
+ size = "md",
366
+ variant = "glass",
367
+ disabled = false,
368
+ loading = false,
369
+ tone = "neutral",
370
+ orientation = "horizontal",
371
+ fullWidth = false,
372
+ density = "comfortable"
373
+ }) {
374
+ const t = useViewfinderLabels(labels);
375
+ const theme = useLoamTheme("viewfinder");
376
+ const { styles } = useStyles(controlSheet);
377
+ const blocked = disabled || loading;
378
+ return /* @__PURE__ */ jsx(
379
+ View,
380
+ {
381
+ role: "group",
382
+ accessibilityLabel: label ?? t.zoom,
383
+ style: [
384
+ styles.lensColumn,
385
+ orientation === "vertical" ? { flexDirection: "column" } : null,
386
+ density === "compact" ? { padding: theme.space[2], gap: theme.space[0] } : null,
387
+ fullWidth ? { alignSelf: "stretch", justifyContent: "space-around" } : null,
388
+ variant === "outline" ? { backgroundColor: "transparent" } : null,
389
+ camToneEdge(theme, tone),
390
+ disabled ? { opacity: theme.state.disabledOpacity } : busyStyle(theme, loading)
391
+ ],
392
+ ...busyProps(loading),
393
+ children: stops.map((stop) => /* @__PURE__ */ jsx(
394
+ LensStop,
395
+ {
396
+ stop,
397
+ on: stop === value,
398
+ labels,
399
+ size,
400
+ disabled: blocked,
401
+ onPick: () => onChange?.(stop)
402
+ },
403
+ stop
404
+ ))
405
+ }
406
+ );
407
+ }
408
+ var controlSheet = createStyleSheet((theme) => ({
409
+ ringRoot: {
410
+ pointerEvents: "none",
411
+ position: "absolute",
412
+ top: theme.space[0],
413
+ bottom: theme.space[0],
414
+ left: theme.space[0],
415
+ right: theme.space[0],
416
+ alignItems: "center",
417
+ justifyContent: "center"
418
+ },
419
+ ringNumber: {
420
+ fontFamily: theme.font.sans,
421
+ fontSize: theme.fontSize[13],
422
+ fontVariant: ["tabular-nums"],
423
+ color: theme.color.good
424
+ },
425
+ shutter: {
426
+ flexGrow: 0,
427
+ flexShrink: 0,
428
+ alignItems: "center",
429
+ justifyContent: "center",
430
+ borderWidth: theme.borderWidth.strong,
431
+ variants: {
432
+ platform: {
433
+ ios: {
434
+ width: theme.space[72] + theme.space[2],
435
+ height: theme.space[72] + theme.space[2],
436
+ borderRadius: theme.radius.full
437
+ },
438
+ android: {
439
+ width: theme.space[68] + theme.space[2],
440
+ height: theme.space[68] + theme.space[2],
441
+ borderRadius: theme.radius["2xl"]
442
+ },
443
+ web: {
444
+ width: theme.space[64] + theme.space[2],
445
+ height: theme.space[64] + theme.space[2],
446
+ borderRadius: theme.radius["2xl"]
447
+ }
448
+ },
449
+ enabled: {
450
+ true: { borderColor: theme.media.ink, opacity: theme.opacity[100] },
451
+ // Dimmed and inert. Still reachable, still named, still able to say why.
452
+ false: { borderColor: theme.white.a8, opacity: theme.state.disabledOpacity }
453
+ }
454
+ }
455
+ },
456
+ shutterFill: {
457
+ width: "100%",
458
+ height: "100%",
459
+ alignItems: "center",
460
+ justifyContent: "center",
461
+ borderRadius: theme.radius.full,
462
+ variants: {
463
+ enabled: {
464
+ true: { backgroundColor: theme.media.ink },
465
+ false: {
466
+ backgroundColor: theme.black.a12,
467
+ borderWidth: theme.borderWidth.base,
468
+ borderColor: theme.white.a5
469
+ }
470
+ }
471
+ }
472
+ },
473
+ notice: {
474
+ flexDirection: "row",
475
+ alignItems: "center",
476
+ justifyContent: "center",
477
+ gap: theme.space[8],
478
+ minHeight: theme.ctl.lg,
479
+ // A sentence in a control-sized box: it takes the width it is given rather
480
+ // than hugging its own text, and the padding stays modest so the words get
481
+ // that width instead of the box.
482
+ alignSelf: "stretch",
483
+ paddingHorizontal: theme.space[12],
484
+ paddingVertical: theme.space[8],
485
+ borderRadius: theme.radius.md,
486
+ backgroundColor: theme.black.a12,
487
+ borderWidth: theme.borderWidth.base,
488
+ borderColor: theme.white.a5
489
+ },
490
+ noticeText: {
491
+ fontFamily: theme.font.sans,
492
+ fontSize: theme.fontSize[13],
493
+ lineHeight: theme.fontSize[18],
494
+ textAlign: "center",
495
+ flexShrink: 1
496
+ },
497
+ lensColumn: {
498
+ flexDirection: "row",
499
+ alignItems: "center",
500
+ alignSelf: "center",
501
+ gap: theme.space[2],
502
+ padding: theme.space[4],
503
+ borderRadius: theme.radius.full,
504
+ backgroundColor: theme.black.a12,
505
+ borderWidth: theme.borderWidth.base,
506
+ borderColor: theme.white.a5
507
+ },
508
+ lensStop: {
509
+ width: theme.ctl.md,
510
+ height: theme.ctl.md,
511
+ flexGrow: 0,
512
+ flexShrink: 0,
513
+ alignItems: "center",
514
+ justifyContent: "center",
515
+ borderRadius: theme.radius.full,
516
+ variants: {
517
+ on: {
518
+ true: { backgroundColor: theme.media.ink },
519
+ false: {}
520
+ }
521
+ }
522
+ },
523
+ lensLabel: {
524
+ fontFamily: theme.font.sans,
525
+ fontSize: theme.fontSize[12],
526
+ fontWeight: theme.fontWeight.semibold,
527
+ fontVariant: ["tabular-nums"]
528
+ }
529
+ }));
530
+ function ScanLine({
531
+ active = true,
532
+ band,
533
+ travel,
534
+ tone = "neutral",
535
+ loading = false
536
+ }) {
537
+ const theme = useLoamTheme("viewfinder");
538
+ const reduced = useReducedMotion();
539
+ const { styles } = useStyles(overlaySheet);
540
+ const accent = camToneColour(theme, tone) ?? theme.color.good;
541
+ const height = band ?? theme.space[80];
542
+ const thickness = theme.borderWidth.heavy;
543
+ const distance = travel ?? height - thickness;
544
+ const offset = React3.useRef(new Animated.Value(0)).current;
545
+ const still = reduced || theme.reduceMotion || loading;
546
+ React3.useEffect(() => {
547
+ if (!active || still) {
548
+ offset.setValue(0);
549
+ return;
550
+ }
551
+ const half = theme.loop.beacon;
552
+ const leg = (to) => Animated.timing(offset, {
553
+ toValue: to,
554
+ duration: half,
555
+ easing: Easing.bezier(...theme.easing.inOut),
556
+ useNativeDriver: true
557
+ });
558
+ const loop = Animated.loop(Animated.sequence([leg(1), leg(0)]));
559
+ loop.start();
560
+ return () => loop.stop();
561
+ }, [active, still, offset, theme.loop.beacon, theme.easing.inOut]);
562
+ if (!active) return null;
563
+ const translateY = still ? distance / 2 : offset.interpolate({ inputRange: [0, 1], outputRange: [0, distance] });
564
+ return /* @__PURE__ */ jsxs(
565
+ View,
566
+ {
567
+ accessible: false,
568
+ testID: still ? "loam-scan-band-static" : "loam-scan-band",
569
+ style: [styles.scanBand, { height }, busyStyle(theme, loading)],
570
+ ...decorativeProps(),
571
+ ...busyProps(loading),
572
+ children: [
573
+ loading ? /* @__PURE__ */ jsx(View, { style: styles.busyCentre, children: /* @__PURE__ */ jsx(BusySpinner, { color: accent }) }) : null,
574
+ /* @__PURE__ */ jsx(
575
+ Animated.View,
576
+ {
577
+ style: [styles.scanLine, { height: thickness, transform: [{ translateY }] }],
578
+ children: /* @__PURE__ */ jsxs(Svg2, { width: "100%", height: thickness, children: [
579
+ /* @__PURE__ */ jsx(Defs, { children: /* @__PURE__ */ jsxs(LinearGradient, { id: "loam-cam-scan", x1: "0", y1: "0", x2: "1", y2: "0", children: [
580
+ /* @__PURE__ */ jsx(Stop, { offset: "0", stopColor: accent, stopOpacity: theme.opacity[0] }),
581
+ /* @__PURE__ */ jsx(Stop, { offset: "0.5", stopColor: accent, stopOpacity: theme.opacity[100] }),
582
+ /* @__PURE__ */ jsx(Stop, { offset: "1", stopColor: accent, stopOpacity: theme.opacity[0] })
583
+ ] }) }),
584
+ /* @__PURE__ */ jsx(Rect, { x: "0", y: "0", width: "100%", height: thickness, fill: "url(#loam-cam-scan)" })
585
+ ] })
586
+ }
587
+ )
588
+ ]
589
+ }
590
+ );
591
+ }
592
+ var GUIDE_BOX = {
593
+ quad: { width: "78%", heightFlex: 62, hole: false },
594
+ circle: { width: "62%", square: true, hole: true },
595
+ line: { width: "84%", hole: true },
596
+ silhouette: { width: "86%", heightFlex: 38, hole: false }
597
+ };
598
+ function Corners({ colour }) {
599
+ const { styles } = useStyles(overlaySheet);
600
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
601
+ /* @__PURE__ */ jsx(View, { style: [styles.cornerTopStart, { borderColor: colour }] }),
602
+ /* @__PURE__ */ jsx(View, { style: [styles.cornerTopEnd, { borderColor: colour }] }),
603
+ /* @__PURE__ */ jsx(View, { style: [styles.cornerBottomStart, { borderColor: colour }] }),
604
+ /* @__PURE__ */ jsx(View, { style: [styles.cornerBottomEnd, { borderColor: colour }] })
605
+ ] });
606
+ }
607
+ function GuideOverlay({
608
+ kind,
609
+ pass = false,
610
+ dimmed = false,
611
+ hint,
612
+ scanning = true,
613
+ tone = "neutral",
614
+ loading = false
615
+ }) {
616
+ const theme = useLoamTheme("viewfinder");
617
+ const { styles } = useStyles(overlaySheet, { pass, dimmed });
618
+ const snap = React3.useRef(new Animated.Value(pass ? 1 : 0)).current;
619
+ React3.useEffect(() => {
620
+ Animated.timing(snap, {
621
+ toValue: pass ? 1 : 0,
622
+ duration: theme.motion.swap.duration,
623
+ easing: Easing.bezier(...theme.motion.swap.easing),
624
+ useNativeDriver: true
625
+ }).start();
626
+ }, [pass, snap, theme.motion.swap.duration, theme.motion.swap.easing]);
627
+ if (kind === "none") return null;
628
+ const box = GUIDE_BOX[kind];
629
+ const colour = pass ? camToneColour(theme, tone) ?? theme.color.good : theme.white.a12;
630
+ const scrim = box.hole && kind !== "circle" ? theme.black.a9 : void 0;
631
+ const reach = Dimensions.get("screen").height;
632
+ const bandGrow = box.heightFlex === void 0 ? null : { flexGrow: (100 - box.heightFlex) / 2 };
633
+ const scale = snap.interpolate({ inputRange: [0, 1], outputRange: [1, 1.015] });
634
+ return /* @__PURE__ */ jsxs(
635
+ View,
636
+ {
637
+ accessible: false,
638
+ testID: `loam-guide-${kind}-${pass ? "pass" : "wait"}`,
639
+ style: [styles.guideRoot, box.hole ? styles.guideRootBleed : null, busyStyle(theme, loading)],
640
+ ...decorativeProps(),
641
+ ...busyProps(loading),
642
+ children: [
643
+ /* @__PURE__ */ jsx(View, { style: [styles.scrimBand, bandGrow, scrim ? { backgroundColor: scrim } : null] }),
644
+ /* @__PURE__ */ jsxs(
645
+ View,
646
+ {
647
+ style: [
648
+ styles.guideRow,
649
+ box.heightFlex === void 0 ? null : { flexGrow: box.heightFlex, flexShrink: 1 }
650
+ ],
651
+ children: [
652
+ /* @__PURE__ */ jsx(View, { style: [styles.scrimSide, scrim ? { backgroundColor: scrim } : null] }),
653
+ /* @__PURE__ */ jsxs(
654
+ Animated.View,
655
+ {
656
+ style: [
657
+ styles.guideBox,
658
+ { width: box.width, transform: [{ scale }] },
659
+ box.square ? styles.guideSquare : null,
660
+ // A share of the band's height, so the box must take the row's
661
+ // height rather than its (absolutely placed) corners' zero.
662
+ box.heightFlex === void 0 ? null : styles.guideStretch
663
+ ],
664
+ children: [
665
+ hint ? /* @__PURE__ */ jsx(View, { style: styles.hintWrap, children: /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles.hint, children: hint }) }) : null,
666
+ kind === "quad" ? /* @__PURE__ */ jsx(Corners, { colour }) : null,
667
+ kind === "circle" ? /* @__PURE__ */ jsxs(Fragment, { children: [
668
+ /* @__PURE__ */ jsx(
669
+ View,
670
+ {
671
+ testID: "loam-guide-hole-ring",
672
+ style: [
673
+ styles.holeRing,
674
+ {
675
+ borderColor: theme.black.a9,
676
+ borderWidth: reach,
677
+ // Past half the ring's size, so it clamps to a true circle
678
+ // and the inner edge (radius minus border) is the guide's.
679
+ // `radius.full` (999) is less than the border, which left
680
+ // the hole square.
681
+ borderRadius: reach * 2,
682
+ top: -reach,
683
+ left: -reach,
684
+ right: -reach,
685
+ bottom: -reach
686
+ }
687
+ ]
688
+ }
689
+ ),
690
+ /* @__PURE__ */ jsx(View, { style: [styles.circleGuide, { borderColor: colour }] })
691
+ ] }) : null,
692
+ kind === "line" ? /* @__PURE__ */ jsx(View, { style: [styles.lineGuide, { borderColor: colour }], children: /* @__PURE__ */ jsx(ScanLine, { active: scanning, tone }) }) : null,
693
+ kind === "silhouette" ? /* @__PURE__ */ jsxs(Svg2, { viewBox: "0 0 100 44", width: "100%", height: "100%", preserveAspectRatio: "xMidYMid meet", children: [
694
+ /* @__PURE__ */ jsx(
695
+ Path,
696
+ {
697
+ d: "M4 32 L10 20 Q14 12 24 10 L64 10 Q76 11 82 20 L94 26 Q97 27 97 31 L97 36 Q97 38 94 38 L6 38 Q3 38 3 35 Z",
698
+ stroke: colour,
699
+ strokeWidth: 1,
700
+ strokeDasharray: "5 3",
701
+ strokeLinejoin: "round",
702
+ fill: "none"
703
+ }
704
+ ),
705
+ /* @__PURE__ */ jsx(Circle, { cx: 26, cy: 38, r: 6, stroke: colour, strokeWidth: 1, strokeDasharray: "4 3", fill: "none" }),
706
+ /* @__PURE__ */ jsx(Circle, { cx: 76, cy: 38, r: 6, stroke: colour, strokeWidth: 1, strokeDasharray: "4 3", fill: "none" })
707
+ ] }) : null
708
+ ]
709
+ }
710
+ ),
711
+ /* @__PURE__ */ jsx(View, { style: [styles.scrimSide, scrim ? { backgroundColor: scrim } : null] })
712
+ ]
713
+ }
714
+ ),
715
+ /* @__PURE__ */ jsx(View, { style: [styles.scrimBand, bandGrow, scrim ? { backgroundColor: scrim } : null] })
716
+ ]
717
+ }
718
+ );
719
+ }
720
+ function ViewfinderGridOverlay({
721
+ visible = false,
722
+ tone = "neutral",
723
+ loading = false
724
+ }) {
725
+ const { styles } = useStyles(overlaySheet);
726
+ const theme = useLoamTheme("viewfinder");
727
+ const accent = camToneColour(theme, tone);
728
+ const tint = accent ? { backgroundColor: accent } : null;
729
+ if (!visible) return null;
730
+ return /* @__PURE__ */ jsxs(
731
+ View,
732
+ {
733
+ accessible: false,
734
+ testID: "loam-grid-overlay",
735
+ style: [styles.gridRoot, busyStyle(theme, loading)],
736
+ ...decorativeProps(),
737
+ ...busyProps(loading),
738
+ children: [
739
+ /* @__PURE__ */ jsx(View, { style: [styles.gridV1, tint] }),
740
+ /* @__PURE__ */ jsx(View, { style: [styles.gridV2, tint] }),
741
+ /* @__PURE__ */ jsx(View, { style: [styles.gridH1, tint] }),
742
+ /* @__PURE__ */ jsx(View, { style: [styles.gridH2, tint] })
743
+ ]
744
+ }
745
+ );
746
+ }
747
+ function FocusPulse({
748
+ point,
749
+ tone,
750
+ loading
751
+ }) {
752
+ const theme = useLoamTheme("viewfinder");
753
+ const reduced = useReducedMotion();
754
+ const { styles } = useStyles(overlaySheet);
755
+ const phase = React3.useRef(new Animated.Value(0)).current;
756
+ const still = reduced || theme.reduceMotion || loading;
757
+ const accent = camToneColour(theme, tone) ?? theme.color.warn;
758
+ React3.useEffect(() => {
759
+ if (still) {
760
+ phase.setValue(1);
761
+ return;
762
+ }
763
+ Animated.timing(phase, {
764
+ toValue: 1,
765
+ duration: theme.duration.slower,
766
+ easing: Easing.bezier(...theme.easing.out),
767
+ useNativeDriver: true
768
+ }).start();
769
+ }, [phase, still, theme.duration.slower, theme.easing.out]);
770
+ const opacity = still ? theme.opacity[100] : phase.interpolate({ inputRange: [0, 0.3, 1], outputRange: [0, 1, 0] });
771
+ const scale = still ? 1 : phase.interpolate({ inputRange: [0, 0.3, 1], outputRange: [1.015, 1, 1] });
772
+ return /* @__PURE__ */ jsx(
773
+ Animated.View,
774
+ {
775
+ accessible: false,
776
+ testID: "loam-focus-indicator",
777
+ style: [
778
+ styles.focusBox,
779
+ {
780
+ left: `${point.x * 100}%`,
781
+ top: `${point.y * 100}%`,
782
+ borderColor: accent,
783
+ opacity,
784
+ transform: [{ scale }]
785
+ },
786
+ busyStyle(theme, loading)
787
+ ],
788
+ ...decorativeProps(),
789
+ ...busyProps(loading),
790
+ children: /* @__PURE__ */ jsxs(Svg2, { viewBox: "0 0 24 24", width: theme.icon.lg, height: theme.icon.lg, children: [
791
+ /* @__PURE__ */ jsx(Line, { x1: 12, y1: 6, x2: 12, y2: 18, stroke: accent, strokeWidth: 1 }),
792
+ /* @__PURE__ */ jsx(Line, { x1: 6, y1: 12, x2: 18, y2: 12, stroke: accent, strokeWidth: 1 })
793
+ ] })
794
+ }
795
+ );
796
+ }
797
+ function FocusIndicator({
798
+ point = null,
799
+ pulseKey = 0,
800
+ tone = "neutral",
801
+ loading = false
802
+ }) {
803
+ if (!point) return null;
804
+ return /* @__PURE__ */ jsx(FocusPulse, { point, tone, loading }, pulseKey);
805
+ }
806
+ function FocusTapZone({
807
+ onFocusPoint,
808
+ tone = "neutral",
809
+ loading = false
810
+ }) {
811
+ const theme = useLoamTheme("viewfinder");
812
+ const { styles } = useStyles(overlaySheet);
813
+ const accent = camToneColour(theme, tone);
814
+ const size = React3.useRef({ width: 0, height: 0 });
815
+ const onLayout = (e) => {
816
+ size.current = {
817
+ width: e.nativeEvent.layout.width,
818
+ height: e.nativeEvent.layout.height
819
+ };
820
+ };
821
+ return /* @__PURE__ */ jsx(
822
+ Pressable,
823
+ {
824
+ accessible: false,
825
+ importantForAccessibility: "no-hide-descendants",
826
+ testID: "loam-focus-zone",
827
+ ...decorativeProps(),
828
+ ...untabbableProps(),
829
+ ...busyProps(loading),
830
+ onLayout,
831
+ style: styles.tapZone,
832
+ onPress: (e) => {
833
+ if (loading || !onFocusPoint) return;
834
+ const { width, height } = size.current;
835
+ if (width === 0 || height === 0) return;
836
+ const { locationX, locationY } = e.nativeEvent;
837
+ onFocusPoint({
838
+ x: Math.min(1, Math.max(0, locationX / width)),
839
+ y: Math.min(1, Math.max(0, locationY / height))
840
+ });
841
+ },
842
+ children: ({ pressed }) => /* @__PURE__ */ jsxs(Fragment, { children: [
843
+ pressed && accent && !loading ? /* @__PURE__ */ jsx(
844
+ View,
845
+ {
846
+ testID: "loam-focus-zone-wash",
847
+ style: [styles.busyCentre, { backgroundColor: accent, opacity: theme.opacity[20] }]
848
+ }
849
+ ) : null,
850
+ loading ? /* @__PURE__ */ jsx(View, { style: styles.busyCentre, children: /* @__PURE__ */ jsx(BusySpinner, { color: accent ?? camInk(theme) }) }) : null
851
+ ] })
852
+ }
853
+ );
854
+ }
855
+ var overlaySheet = createStyleSheet((theme) => ({
856
+ scanBand: {
857
+ width: "100%",
858
+ overflow: "hidden",
859
+ // In the style object, not as a prop: the prop form is deprecated in
860
+ // react-native-web and warns on every render.
861
+ pointerEvents: "none"
862
+ },
863
+ scanLine: {
864
+ position: "absolute",
865
+ left: theme.space[0],
866
+ right: theme.space[0],
867
+ top: theme.space[0]
868
+ },
869
+ guideRoot: {
870
+ pointerEvents: "none",
871
+ position: "absolute",
872
+ top: theme.space[0],
873
+ bottom: theme.space[0],
874
+ left: theme.space[0],
875
+ right: theme.space[0],
876
+ flexDirection: "column",
877
+ variants: {
878
+ // The guide has done its job once a tracker locks; the boxes are the
879
+ // thing to look at (spec E.4).
880
+ dimmed: { true: { opacity: theme.opacity[20] }, false: {} },
881
+ pass: { true: {}, false: {} }
882
+ }
883
+ },
884
+ scrimBand: {
885
+ flexGrow: 1,
886
+ flexShrink: 1,
887
+ flexBasis: theme.space[0]
888
+ },
889
+ // The row's own bands. `alignSelf: 'stretch'` is the load-bearing line: the
890
+ // row centres its children, and a band with no content and no stretch is
891
+ // zero points tall — which left the circle's "hole" a full-width strip.
892
+ scrimSide: {
893
+ flexGrow: 1,
894
+ flexShrink: 1,
895
+ flexBasis: theme.space[0],
896
+ alignSelf: "stretch"
897
+ },
898
+ holeRing: {
899
+ position: "absolute"
900
+ },
901
+ guideRootBleed: {
902
+ top: "-100%",
903
+ bottom: "-100%"
904
+ },
905
+ guideRow: {
906
+ flexDirection: "row",
907
+ alignItems: "center",
908
+ justifyContent: "center"
909
+ },
910
+ guideBox: {
911
+ alignItems: "center",
912
+ justifyContent: "center"
913
+ },
914
+ guideStretch: {
915
+ alignSelf: "stretch"
916
+ },
917
+ guideSquare: {
918
+ aspectRatio: 1
919
+ },
920
+ circleGuide: {
921
+ width: "100%",
922
+ height: "100%",
923
+ borderRadius: theme.radius.full,
924
+ borderWidth: theme.borderWidth.strong
925
+ },
926
+ lineGuide: {
927
+ width: "100%",
928
+ borderRadius: theme.radius.sm,
929
+ borderWidth: theme.borderWidth.strong,
930
+ overflow: "hidden"
931
+ },
932
+ hintWrap: {
933
+ position: "absolute",
934
+ bottom: "100%",
935
+ marginBottom: theme.space[8],
936
+ alignItems: "center"
937
+ },
938
+ // An instruction, so the sans face at full ink — mono with wide tracking is
939
+ // the metadata treatment (the feed label), and it read as a caption here.
940
+ hint: {
941
+ fontFamily: theme.font.sans,
942
+ fontSize: theme.fontSize[12],
943
+ color: theme.media.ink,
944
+ paddingHorizontal: theme.space[12],
945
+ height: theme.space[24],
946
+ lineHeight: theme.space[24],
947
+ borderRadius: theme.radius.full,
948
+ backgroundColor: theme.black.a12,
949
+ borderWidth: theme.borderWidth.base,
950
+ borderColor: theme.white.a5,
951
+ overflow: "hidden"
952
+ },
953
+ cornerTopStart: {
954
+ position: "absolute",
955
+ top: theme.space[0],
956
+ left: theme.space[0],
957
+ width: theme.space[32],
958
+ height: theme.space[32],
959
+ borderTopWidth: theme.borderWidth.strong,
960
+ borderLeftWidth: theme.borderWidth.strong,
961
+ borderTopLeftRadius: theme.radius.sm
962
+ },
963
+ cornerTopEnd: {
964
+ position: "absolute",
965
+ top: theme.space[0],
966
+ right: theme.space[0],
967
+ width: theme.space[32],
968
+ height: theme.space[32],
969
+ borderTopWidth: theme.borderWidth.strong,
970
+ borderRightWidth: theme.borderWidth.strong,
971
+ borderTopRightRadius: theme.radius.sm
972
+ },
973
+ cornerBottomStart: {
974
+ position: "absolute",
975
+ bottom: theme.space[0],
976
+ left: theme.space[0],
977
+ width: theme.space[32],
978
+ height: theme.space[32],
979
+ borderBottomWidth: theme.borderWidth.strong,
980
+ borderLeftWidth: theme.borderWidth.strong,
981
+ borderBottomLeftRadius: theme.radius.sm
982
+ },
983
+ cornerBottomEnd: {
984
+ position: "absolute",
985
+ bottom: theme.space[0],
986
+ right: theme.space[0],
987
+ width: theme.space[32],
988
+ height: theme.space[32],
989
+ borderBottomWidth: theme.borderWidth.strong,
990
+ borderRightWidth: theme.borderWidth.strong,
991
+ borderBottomRightRadius: theme.radius.sm
992
+ },
993
+ gridRoot: {
994
+ pointerEvents: "none",
995
+ position: "absolute",
996
+ top: theme.space[0],
997
+ bottom: theme.space[0],
998
+ left: theme.space[0],
999
+ right: theme.space[0]
1000
+ },
1001
+ gridV1: {
1002
+ position: "absolute",
1003
+ top: theme.space[0],
1004
+ bottom: theme.space[0],
1005
+ left: "33.333%",
1006
+ width: theme.borderWidth.hair,
1007
+ backgroundColor: theme.white.a5
1008
+ },
1009
+ gridV2: {
1010
+ position: "absolute",
1011
+ top: theme.space[0],
1012
+ bottom: theme.space[0],
1013
+ left: "66.666%",
1014
+ width: theme.borderWidth.hair,
1015
+ backgroundColor: theme.white.a5
1016
+ },
1017
+ gridH1: {
1018
+ position: "absolute",
1019
+ left: theme.space[0],
1020
+ right: theme.space[0],
1021
+ top: "33.333%",
1022
+ height: theme.borderWidth.hair,
1023
+ backgroundColor: theme.white.a5
1024
+ },
1025
+ gridH2: {
1026
+ position: "absolute",
1027
+ left: theme.space[0],
1028
+ right: theme.space[0],
1029
+ top: "66.666%",
1030
+ height: theme.borderWidth.hair,
1031
+ backgroundColor: theme.white.a5
1032
+ },
1033
+ focusBox: {
1034
+ pointerEvents: "none",
1035
+ position: "absolute",
1036
+ width: theme.space[72],
1037
+ height: theme.space[72],
1038
+ marginLeft: -theme.space[36],
1039
+ marginTop: -theme.space[36],
1040
+ alignItems: "center",
1041
+ justifyContent: "center",
1042
+ borderRadius: theme.radius.sm,
1043
+ borderWidth: theme.borderWidth.strong
1044
+ },
1045
+ busyCentre: {
1046
+ pointerEvents: "none",
1047
+ position: "absolute",
1048
+ top: theme.space[0],
1049
+ bottom: theme.space[0],
1050
+ left: theme.space[0],
1051
+ right: theme.space[0],
1052
+ alignItems: "center",
1053
+ justifyContent: "center"
1054
+ },
1055
+ tapZone: {
1056
+ position: "absolute",
1057
+ top: theme.space[0],
1058
+ bottom: theme.space[0],
1059
+ left: theme.space[0],
1060
+ right: theme.space[0]
1061
+ }
1062
+ }));
1063
+ var AnimatedPath = Animated.createAnimatedComponent(Path);
1064
+ var SEVERITY_DASH = {
1065
+ none: "dotted",
1066
+ minor: "dashed",
1067
+ moderate: "solid"
1068
+ };
1069
+ function toneStroke(theme, tone) {
1070
+ switch (tone) {
1071
+ case "good":
1072
+ return theme.color.good;
1073
+ case "warn":
1074
+ return theme.color.warn;
1075
+ case "danger":
1076
+ return theme.color.danger;
1077
+ default:
1078
+ return theme.white.a12;
1079
+ }
1080
+ }
1081
+ function TrackChip({
1082
+ label,
1083
+ conf,
1084
+ slot = "above",
1085
+ anchor = "start",
1086
+ room = 100,
1087
+ staggerIndex = 0,
1088
+ frozen = false,
1089
+ tone: toneProp,
1090
+ size = "md",
1091
+ variant = "glass",
1092
+ selected = false,
1093
+ leading,
1094
+ loading = false,
1095
+ disabled = false,
1096
+ motion = "full",
1097
+ removable = false,
1098
+ onRemove,
1099
+ removeLabel,
1100
+ labels
1101
+ }) {
1102
+ const theme = useLoamTheme("viewfinder");
1103
+ const t = useViewfinderLabels(labels);
1104
+ const reduced = useReducedMotion();
1105
+ const tone = confidenceTone(conf);
1106
+ const { styles } = useStyles(trackingSheet, { slot, tone, anchor });
1107
+ const dotTone = camToneColour(theme, toneProp);
1108
+ const still = reduced || theme.reduceMotion || frozen || motion !== "full";
1109
+ const enter = React3.useRef(new Animated.Value(still ? 1 : 0)).current;
1110
+ const delay = React3.useRef(staggerIndex * TRACKING_MOTION.chipStagger).current;
1111
+ React3.useEffect(() => {
1112
+ if (still) {
1113
+ enter.setValue(1);
1114
+ return;
1115
+ }
1116
+ const anim = Animated.timing(enter, {
1117
+ toValue: 1,
1118
+ delay,
1119
+ duration: theme.motion.enter.duration,
1120
+ easing: Easing.bezier(...theme.motion.enter.easing),
1121
+ useNativeDriver: true
1122
+ });
1123
+ anim.start();
1124
+ return () => anim.stop();
1125
+ }, [still, enter, delay, theme.motion.enter.duration, theme.motion.enter.easing]);
1126
+ return /* @__PURE__ */ jsx(
1127
+ View,
1128
+ {
1129
+ style: [styles.chipLane, { width: `${room}%` }, removable ? { pointerEvents: "box-none" } : null],
1130
+ ...removable ? {} : decorativeProps(),
1131
+ children: /* @__PURE__ */ jsxs(
1132
+ Animated.View,
1133
+ {
1134
+ accessible: false,
1135
+ testID: `loam-track-chip-${slot}`,
1136
+ "aria-current": selected ? true : void 0,
1137
+ style: [
1138
+ styles.chip,
1139
+ size === "sm" ? { paddingHorizontal: theme.space[6], paddingVertical: theme.space[0] } : null,
1140
+ variant === "outline" ? { backgroundColor: "transparent" } : null,
1141
+ selected ? { backgroundColor: theme.white.a5, borderColor: theme.media.ink } : null,
1142
+ busyStyle(theme, loading),
1143
+ { opacity: loading || disabled ? theme.state.disabledOpacity : enter }
1144
+ ],
1145
+ ...busyProps(loading),
1146
+ ...disabledProps(disabled),
1147
+ children: [
1148
+ loading ? /* @__PURE__ */ jsx(BusySpinner, { color: camInk(theme) }) : leading ? /* @__PURE__ */ jsx(Icon, { name: leading, size: theme.icon.xs, color: camInk(theme) }) : /* @__PURE__ */ jsx(View, { style: [styles.chipDot, dotTone ? { backgroundColor: dotTone } : null] }),
1149
+ /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles.chipLabel, children: label }),
1150
+ /* @__PURE__ */ jsx(Text, { style: styles.chipConf, children: confidenceLabel(conf) }),
1151
+ removable ? /* @__PURE__ */ jsx(
1152
+ PillRemoveButton,
1153
+ {
1154
+ label: removeLabel ?? t.removeNamed(label),
1155
+ onPress: onRemove,
1156
+ color: camInk(theme),
1157
+ disabled
1158
+ }
1159
+ ) : null
1160
+ ]
1161
+ }
1162
+ )
1163
+ }
1164
+ );
1165
+ }
1166
+ function TrackCountPill({
1167
+ count,
1168
+ label,
1169
+ copy,
1170
+ tone = "neutral",
1171
+ size = "md",
1172
+ variant = "glass",
1173
+ leading,
1174
+ loading = false,
1175
+ disabled = false,
1176
+ selected = false,
1177
+ motion,
1178
+ removable = false,
1179
+ onRemove,
1180
+ removeLabel,
1181
+ labels
1182
+ }) {
1183
+ const words = useAnalyzerCopy(copy);
1184
+ const t = useViewfinderLabels(labels);
1185
+ const enter = useEnterFade(motion);
1186
+ const theme = useLoamTheme("viewfinder");
1187
+ const { styles } = useStyles(trackingSheet);
1188
+ const accent = camToneColour(theme, tone);
1189
+ if (count <= 0) return null;
1190
+ const text = label ?? trackCountLabel(count, words);
1191
+ return /* @__PURE__ */ jsxs(
1192
+ Animated.View,
1193
+ {
1194
+ accessible: false,
1195
+ testID: "loam-track-count",
1196
+ "aria-current": selected ? true : void 0,
1197
+ style: [
1198
+ styles.countPill,
1199
+ size === "sm" ? { paddingHorizontal: theme.space[8], paddingVertical: theme.space[2] } : null,
1200
+ variant === "outline" ? { backgroundColor: "transparent" } : null,
1201
+ accent ? { borderColor: accent } : null,
1202
+ selected ? { backgroundColor: theme.white.a5, borderColor: theme.media.ink } : null,
1203
+ motion === void 0 ? null : { opacity: enter },
1204
+ busyStyle(theme, loading),
1205
+ disabledStyle(theme, disabled)
1206
+ ],
1207
+ ...removable ? {} : decorativeProps(),
1208
+ ...busyProps(loading),
1209
+ ...disabledProps(disabled),
1210
+ children: [
1211
+ loading ? /* @__PURE__ */ jsx(BusySpinner, { color: camInk(theme) }) : leading ? /* @__PURE__ */ jsx(Icon, { name: leading, size: theme.icon.xs, color: camInk(theme) }) : null,
1212
+ /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles.countText, children: text }),
1213
+ removable ? /* @__PURE__ */ jsx(PillRemoveButton, { label: removeLabel ?? t.removeNamed(text), onPress: onRemove, color: camInk(theme), disabled }) : null
1214
+ ]
1215
+ }
1216
+ );
1217
+ }
1218
+ var OUTLINE_PATH = {
1219
+ /** A leafy blob — the plant profile's subject. */
1220
+ blob: "M50 6 C72 6 92 22 94 46 C96 70 78 94 50 94 C22 94 4 70 6 46 C8 22 28 6 50 6 Z",
1221
+ /** A car in three-quarter view — the panel profile's subject. */
1222
+ car: "M6 66 L14 40 Q19 26 34 23 L70 23 Q84 25 90 40 L94 54 Q96 58 96 64 L96 74 Q96 78 90 78 L10 78 Q4 78 4 72 Z"
1223
+ };
1224
+ function pct(v) {
1225
+ return v.interpolate({ inputRange: [0, 100], outputRange: ["0%", "100%"] });
1226
+ }
1227
+ function TrackedBox({
1228
+ object,
1229
+ locked,
1230
+ tone,
1231
+ chip = true,
1232
+ chipIndex = 0,
1233
+ ease = TRACKING_MOTION.ease,
1234
+ frozen = false,
1235
+ loading = false
1236
+ }) {
1237
+ const theme = useLoamTheme("viewfinder");
1238
+ const reduced = useReducedMotion();
1239
+ const [x, y, w, h] = object.box;
1240
+ const isLocked = locked ?? object.locked ?? false;
1241
+ const severity = object.severity;
1242
+ const resolved = tone ?? trackTone({ ...object, locked: isLocked });
1243
+ const dash = severity ? SEVERITY_DASH[severity] : "solid";
1244
+ const { styles } = useStyles(trackingSheet, { dash });
1245
+ const stroke = toneStroke(theme, resolved);
1246
+ const still = reduced || theme.reduceMotion || frozen;
1247
+ const geo = React3.useRef({
1248
+ x: new Animated.Value(x),
1249
+ y: new Animated.Value(y),
1250
+ w: new Animated.Value(w),
1251
+ h: new Animated.Value(h)
1252
+ }).current;
1253
+ const lock = React3.useRef(new Animated.Value(1)).current;
1254
+ const ants = React3.useRef(new Animated.Value(0)).current;
1255
+ const last = React3.useRef(object.box);
1256
+ React3.useEffect(() => {
1257
+ const to = { x, y, w, h };
1258
+ const keys = ["x", "y", "w", "h"];
1259
+ const [px, py, pw, ph] = last.current;
1260
+ const moved = px !== x || py !== y || pw !== w || ph !== h;
1261
+ last.current = [x, y, w, h];
1262
+ if (still) {
1263
+ for (const k of keys) geo[k].setValue(to[k]);
1264
+ return;
1265
+ }
1266
+ if (!moved) return;
1267
+ const anim = Animated.parallel(
1268
+ keys.map(
1269
+ (k) => Animated.timing(geo[k], {
1270
+ toValue: to[k],
1271
+ duration: ease,
1272
+ easing: Easing.bezier(...theme.easing.out),
1273
+ useNativeDriver: false
1274
+ })
1275
+ )
1276
+ );
1277
+ anim.start();
1278
+ return () => anim.stop();
1279
+ }, [x, y, w, h, still, ease, geo, last, theme.easing.out]);
1280
+ React3.useEffect(() => {
1281
+ if (!isLocked || still) {
1282
+ lock.setValue(1);
1283
+ return;
1284
+ }
1285
+ lock.setValue(0);
1286
+ const anim = Animated.timing(lock, {
1287
+ toValue: 1,
1288
+ duration: TRACKING_MOTION.lock,
1289
+ easing: Easing.bezier(...theme.easing.out),
1290
+ useNativeDriver: true
1291
+ });
1292
+ anim.start();
1293
+ return () => anim.stop();
1294
+ }, [isLocked, still, lock, theme.easing.out]);
1295
+ React3.useEffect(() => {
1296
+ if (!object.outline || still) {
1297
+ ants.setValue(0);
1298
+ return;
1299
+ }
1300
+ const loop = Animated.loop(
1301
+ Animated.timing(ants, {
1302
+ toValue: 1,
1303
+ duration: TRACKING_MOTION.ants,
1304
+ easing: Easing.linear,
1305
+ useNativeDriver: false
1306
+ })
1307
+ );
1308
+ loop.start();
1309
+ return () => loop.stop();
1310
+ }, [object.outline, still, ants]);
1311
+ const dashUnit = theme.space[4];
1312
+ const lockScale = lock.interpolate({
1313
+ inputRange: [0, 1],
1314
+ outputRange: [TRACKING_MOTION.lockScale, 1]
1315
+ });
1316
+ return /* @__PURE__ */ jsxs(
1317
+ Animated.View,
1318
+ {
1319
+ accessible: false,
1320
+ testID: `loam-track-box-${object.id}`,
1321
+ style: [
1322
+ styles.box,
1323
+ { left: pct(geo.x), top: pct(geo.y), width: pct(geo.w), height: pct(geo.h) },
1324
+ busyStyle(theme, loading)
1325
+ ],
1326
+ ...decorativeProps(),
1327
+ ...busyProps(loading),
1328
+ children: [
1329
+ /* @__PURE__ */ jsxs(Animated.View, { style: [styles.bracketLayer, { transform: [{ scale: lockScale }] }], children: [
1330
+ /* @__PURE__ */ jsx(View, { style: [styles.armTopStart, { borderColor: stroke }] }),
1331
+ /* @__PURE__ */ jsx(View, { style: [styles.armTopEnd, { borderColor: stroke }] }),
1332
+ /* @__PURE__ */ jsx(View, { style: [styles.armBottomStart, { borderColor: stroke }] }),
1333
+ /* @__PURE__ */ jsx(View, { style: [styles.armBottomEnd, { borderColor: stroke }] })
1334
+ ] }),
1335
+ object.outline ? (
1336
+ // A wrapping `View`, not `style` on the `Svg`: the outline has to be an
1337
+ // absolutely positioned layer over the box, and a `View` is the thing
1338
+ // this library positions.
1339
+ /* @__PURE__ */ jsx(View, { testID: "loam-track-outline", style: styles.outline, children: /* @__PURE__ */ jsx(Svg2, { viewBox: "0 0 100 100", width: "100%", height: "100%", preserveAspectRatio: "none", children: /* @__PURE__ */ jsx(
1340
+ AnimatedPath,
1341
+ {
1342
+ d: OUTLINE_PATH[object.outline],
1343
+ stroke,
1344
+ strokeWidth: 1,
1345
+ strokeLinejoin: "round",
1346
+ vectorEffect: "non-scaling-stroke",
1347
+ fill: "none",
1348
+ strokeDasharray: [dashUnit, dashUnit],
1349
+ strokeDashoffset: ants.interpolate({
1350
+ inputRange: [0, 1],
1351
+ outputRange: [0, theme.space[8]]
1352
+ })
1353
+ }
1354
+ ) }) })
1355
+ ) : null,
1356
+ isLocked ? (
1357
+ // The lock's non-colour channel. Inside the box's trailing-top corner,
1358
+ // where it cannot collide with a chip in any of the three slots.
1359
+ /* @__PURE__ */ jsx(View, { testID: "loam-track-lock", style: styles.lockGlyph, children: /* @__PURE__ */ jsx(Icon, { name: "lock", size: theme.icon.xs, color: stroke }) })
1360
+ ) : null,
1361
+ chip ? /* @__PURE__ */ jsx(
1362
+ TrackChip,
1363
+ {
1364
+ label: object.label,
1365
+ conf: object.conf,
1366
+ slot: chipSlot(object.box),
1367
+ anchor: chipAnchor(object.box),
1368
+ room: chipRoom(object.box),
1369
+ staggerIndex: chipIndex,
1370
+ frozen
1371
+ }
1372
+ ) : null
1373
+ ]
1374
+ }
1375
+ );
1376
+ }
1377
+ function TrackingOverlay({
1378
+ objects = [],
1379
+ maxChips = MAX_CHIPS,
1380
+ ease = TRACKING_MOTION.ease,
1381
+ frozen = false,
1382
+ dimmed = false,
1383
+ safeAreaBottom = 0,
1384
+ label,
1385
+ copy,
1386
+ tone,
1387
+ loading = false
1388
+ }) {
1389
+ const words = useAnalyzerCopy(copy);
1390
+ const { styles } = useStyles(trackingSheet, { dimmed: dimmed || loading });
1391
+ const [framePx, setFramePx] = React3.useState(0);
1392
+ const { chips, overflow } = visibleChips([...objects], maxChips, framePx || void 0);
1393
+ const chipIndex = new Map(chips.map((o, i) => [o.id, i]));
1394
+ const name = label === void 0 ? trackingSummaryLabel(objects, words) : label;
1395
+ return /* @__PURE__ */ jsxs(
1396
+ View,
1397
+ {
1398
+ testID: "loam-tracking-overlay",
1399
+ accessible: name !== null,
1400
+ accessibilityRole: name === null ? void 0 : "image",
1401
+ accessibilityLabel: name ?? void 0,
1402
+ style: styles.overlayRoot,
1403
+ onLayout: (e) => setFramePx(e.nativeEvent.layout.width),
1404
+ ...name === null ? decorativeProps() : {},
1405
+ ...busyProps(loading),
1406
+ children: [
1407
+ objects.map((o) => /* @__PURE__ */ jsx(
1408
+ TrackedBox,
1409
+ {
1410
+ object: o,
1411
+ tone,
1412
+ chip: chipIndex.has(o.id),
1413
+ chipIndex: chipIndex.get(o.id) ?? 0,
1414
+ ease,
1415
+ frozen
1416
+ },
1417
+ o.id
1418
+ )),
1419
+ overflow > 0 ? /* @__PURE__ */ jsx(View, { style: [styles.countRow, { marginTop: -safeAreaBottom }], children: /* @__PURE__ */ jsx(TrackCountPill, { count: objects.length }) }) : null
1420
+ ]
1421
+ }
1422
+ );
1423
+ }
1424
+ var trackingSheet = createStyleSheet((theme) => ({
1425
+ overlayRoot: {
1426
+ pointerEvents: "none",
1427
+ position: "absolute",
1428
+ top: theme.space[0],
1429
+ bottom: theme.space[0],
1430
+ left: theme.space[0],
1431
+ right: theme.space[0],
1432
+ variants: {
1433
+ // `analysing` fades the layer back; every state inside keeps its own
1434
+ // channels, so the opacity is carrying nothing but distance.
1435
+ dimmed: { true: { opacity: theme.opacity[48] }, false: {} }
1436
+ }
1437
+ },
1438
+ box: {
1439
+ pointerEvents: "none",
1440
+ position: "absolute"
1441
+ },
1442
+ bracketLayer: {
1443
+ position: "absolute",
1444
+ top: theme.space[0],
1445
+ bottom: theme.space[0],
1446
+ left: theme.space[0],
1447
+ right: theme.space[0]
1448
+ },
1449
+ outline: {
1450
+ position: "absolute",
1451
+ top: theme.space[0],
1452
+ bottom: theme.space[0],
1453
+ left: theme.space[0],
1454
+ right: theme.space[0]
1455
+ },
1456
+ // Arm length is a share of the box, so a 6% box gets small brackets and a
1457
+ // 60% box gets large ones rather than every box getting 32pt.
1458
+ armTopStart: {
1459
+ position: "absolute",
1460
+ top: theme.space[0],
1461
+ left: theme.space[0],
1462
+ width: "25%",
1463
+ height: "25%",
1464
+ maxWidth: theme.space[32],
1465
+ maxHeight: theme.space[32],
1466
+ borderTopWidth: theme.borderWidth.strong,
1467
+ borderLeftWidth: theme.borderWidth.strong,
1468
+ borderTopLeftRadius: theme.radius.xs,
1469
+ variants: {
1470
+ dash: {
1471
+ dotted: { borderStyle: "dotted" },
1472
+ dashed: { borderStyle: "dashed" },
1473
+ solid: { borderStyle: "solid" }
1474
+ }
1475
+ }
1476
+ },
1477
+ armTopEnd: {
1478
+ position: "absolute",
1479
+ top: theme.space[0],
1480
+ right: theme.space[0],
1481
+ width: "25%",
1482
+ height: "25%",
1483
+ maxWidth: theme.space[32],
1484
+ maxHeight: theme.space[32],
1485
+ borderTopWidth: theme.borderWidth.strong,
1486
+ borderRightWidth: theme.borderWidth.strong,
1487
+ borderTopRightRadius: theme.radius.xs,
1488
+ variants: {
1489
+ dash: {
1490
+ dotted: { borderStyle: "dotted" },
1491
+ dashed: { borderStyle: "dashed" },
1492
+ solid: { borderStyle: "solid" }
1493
+ }
1494
+ }
1495
+ },
1496
+ armBottomStart: {
1497
+ position: "absolute",
1498
+ bottom: theme.space[0],
1499
+ left: theme.space[0],
1500
+ width: "25%",
1501
+ height: "25%",
1502
+ maxWidth: theme.space[32],
1503
+ maxHeight: theme.space[32],
1504
+ borderBottomWidth: theme.borderWidth.strong,
1505
+ borderLeftWidth: theme.borderWidth.strong,
1506
+ borderBottomLeftRadius: theme.radius.xs,
1507
+ variants: {
1508
+ dash: {
1509
+ dotted: { borderStyle: "dotted" },
1510
+ dashed: { borderStyle: "dashed" },
1511
+ solid: { borderStyle: "solid" }
1512
+ }
1513
+ }
1514
+ },
1515
+ armBottomEnd: {
1516
+ position: "absolute",
1517
+ bottom: theme.space[0],
1518
+ right: theme.space[0],
1519
+ width: "25%",
1520
+ height: "25%",
1521
+ maxWidth: theme.space[32],
1522
+ maxHeight: theme.space[32],
1523
+ borderBottomWidth: theme.borderWidth.strong,
1524
+ borderRightWidth: theme.borderWidth.strong,
1525
+ borderBottomRightRadius: theme.radius.xs,
1526
+ variants: {
1527
+ dash: {
1528
+ dotted: { borderStyle: "dotted" },
1529
+ dashed: { borderStyle: "dashed" },
1530
+ solid: { borderStyle: "solid" }
1531
+ }
1532
+ }
1533
+ },
1534
+ lockGlyph: {
1535
+ position: "absolute",
1536
+ top: theme.space[0],
1537
+ right: theme.space[0],
1538
+ margin: theme.space[2]
1539
+ },
1540
+ // The lane the chip hugs its content in. An absolute box shrink-wraps to its
1541
+ // containing block, so a chip positioned straight on a 60px wheel box was
1542
+ // capped at 60px: the label collapsed to nothing and the percentage spilled
1543
+ // past the plate. The lane anchors at the edge `chipAnchor()` picks and is as
1544
+ // wide as `chipRoom()` — up to the frame edge, never past a menu's width — and
1545
+ // the chip sizes to its own label inside it.
1546
+ chipLane: {
1547
+ pointerEvents: "none",
1548
+ position: "absolute",
1549
+ maxWidth: theme.panel.xs,
1550
+ flexDirection: "row",
1551
+ variants: {
1552
+ anchor: {
1553
+ start: { left: theme.space[0], justifyContent: "flex-start" },
1554
+ end: { right: theme.space[0], justifyContent: "flex-end" }
1555
+ },
1556
+ slot: {
1557
+ above: { bottom: "100%", marginBottom: theme.space[4] },
1558
+ "inside-top": { top: theme.space[0], marginTop: theme.space[4] },
1559
+ below: { top: "100%", marginTop: theme.space[4] }
1560
+ }
1561
+ }
1562
+ },
1563
+ chip: {
1564
+ flexShrink: 1,
1565
+ flexDirection: "row",
1566
+ alignItems: "center",
1567
+ gap: theme.space[6],
1568
+ paddingHorizontal: theme.space[8],
1569
+ paddingVertical: theme.space[2],
1570
+ borderRadius: theme.radius.full,
1571
+ // The same plate `viewfinder-chrome.tsx` defines, written out rather than
1572
+ // spread from `camGlass()`: a spread of a function's return type collapses
1573
+ // Unistyles' variant inference for the whole sheet, and the `slot` and
1574
+ // `tone` variants below are what place and colour this chip.
1575
+ backgroundColor: theme.black.a12,
1576
+ borderWidth: theme.borderWidth.base,
1577
+ borderColor: theme.white.a5,
1578
+ variants: {
1579
+ tone: { good: {}, warn: {}, danger: {} }
1580
+ }
1581
+ },
1582
+ chipDot: {
1583
+ width: theme.space[6],
1584
+ height: theme.space[6],
1585
+ flexGrow: 0,
1586
+ flexShrink: 0,
1587
+ borderRadius: theme.radius.full,
1588
+ variants: {
1589
+ tone: {
1590
+ good: { backgroundColor: theme.color.good },
1591
+ warn: { backgroundColor: theme.color.warn },
1592
+ danger: { backgroundColor: theme.color.danger }
1593
+ },
1594
+ slot: { above: {}, "inside-top": {}, below: {} }
1595
+ }
1596
+ },
1597
+ chipLabel: {
1598
+ fontFamily: theme.font.sans,
1599
+ fontSize: theme.fontSize[11],
1600
+ color: camInk(theme),
1601
+ flexShrink: 1
1602
+ },
1603
+ chipConf: {
1604
+ fontFamily: theme.font.mono,
1605
+ fontSize: theme.fontSize[11],
1606
+ color: camInk(theme),
1607
+ flexGrow: 0,
1608
+ flexShrink: 0,
1609
+ fontVariant: ["tabular-nums"]
1610
+ },
1611
+ countRow: {
1612
+ position: "absolute",
1613
+ top: `${TRACK_BAND_BOTTOM}%`,
1614
+ left: theme.space[0],
1615
+ right: theme.space[0],
1616
+ alignItems: "center"
1617
+ },
1618
+ countPill: {
1619
+ flexDirection: "row",
1620
+ alignItems: "center",
1621
+ paddingHorizontal: theme.space[12],
1622
+ paddingVertical: theme.space[4],
1623
+ borderRadius: theme.radius.full,
1624
+ backgroundColor: theme.black.a12,
1625
+ borderWidth: theme.borderWidth.base,
1626
+ borderColor: theme.white.a5
1627
+ },
1628
+ countText: {
1629
+ fontFamily: theme.font.mono,
1630
+ fontSize: theme.fontSize[11],
1631
+ color: camInk(theme),
1632
+ fontVariant: ["tabular-nums"]
1633
+ }
1634
+ }));
1635
+ function ObjectHighlight({
1636
+ target,
1637
+ phase,
1638
+ locked = true,
1639
+ highContrast = false,
1640
+ tone = "neutral",
1641
+ loading = false
1642
+ }) {
1643
+ const theme = useLoamTheme("viewfinder");
1644
+ const { styles } = useStyles(identifySheet);
1645
+ const [size, setSize] = React3.useState({ w: 0, h: 0 });
1646
+ const onLayout = React3.useCallback((e) => {
1647
+ const { width: width2, height } = e.nativeEvent.layout;
1648
+ setSize((s) => s.w === width2 && s.h === height ? s : { w: width2, h: height });
1649
+ }, []);
1650
+ if (!target) return null;
1651
+ const weight = highlightWeight(phase, { lost: !locked, highContrast });
1652
+ const width = {
1653
+ "space-3": theme.space[3],
1654
+ "space-4": theme.space[4],
1655
+ "space-6": theme.space[6],
1656
+ "space-8": theme.space[8],
1657
+ thick: theme.borderWidth.thick,
1658
+ heavy: theme.borderWidth.heavy
1659
+ };
1660
+ const black = {
1661
+ 7: theme.black.a7,
1662
+ 8: theme.black.a8,
1663
+ 10: theme.black.a10,
1664
+ 11: theme.black.a11,
1665
+ 12: theme.black.a12,
1666
+ 13: theme.black.a13,
1667
+ 14: theme.black.a14
1668
+ };
1669
+ const { w, h } = size;
1670
+ const d = w > 0 && h > 0 ? target.contour ? contourPath(target.contour, w, h) : boxPath(target.box, w, h, theme.radius.sm) : "";
1671
+ const dash = weight.dashed ? [theme.space[6], theme.space[6]] : void 0;
1672
+ return /* @__PURE__ */ jsxs(
1673
+ View,
1674
+ {
1675
+ style: [styles.root, busyStyle(theme, loading)],
1676
+ onLayout,
1677
+ testID: "loam-object-highlight",
1678
+ ...decorativeProps(),
1679
+ ...busyProps(loading),
1680
+ children: [
1681
+ loading ? /* @__PURE__ */ jsx(View, { style: styles.busyCentre, children: /* @__PURE__ */ jsx(BusySpinner, { color: camToneColour(theme, tone) ?? theme.media.ink }) }) : null,
1682
+ d ? /* @__PURE__ */ jsxs(Svg2, { width: w, height: h, testID: "loam-object-highlight-svg", children: [
1683
+ /* @__PURE__ */ jsx(Defs, { children: /* @__PURE__ */ jsxs(Mask, { id: "loam-hl-cut", x: "0", y: "0", width: w, height: h, children: [
1684
+ /* @__PURE__ */ jsx(Rect, { x: "0", y: "0", width: w, height: h, fill: theme.media.ink }),
1685
+ /* @__PURE__ */ jsx(Path, { d, fill: theme.black.a14 })
1686
+ ] }) }),
1687
+ weight.scrim ? /* @__PURE__ */ jsx(
1688
+ Rect,
1689
+ {
1690
+ x: "0",
1691
+ y: "0",
1692
+ width: w,
1693
+ height: h,
1694
+ fill: black[weight.scrim],
1695
+ mask: "url(#loam-hl-cut)"
1696
+ }
1697
+ ) : null,
1698
+ /* @__PURE__ */ jsx(
1699
+ Path,
1700
+ {
1701
+ d,
1702
+ fill: "none",
1703
+ stroke: black[weight.halo.alpha],
1704
+ strokeWidth: width[weight.halo.width],
1705
+ strokeLinejoin: "round",
1706
+ strokeDasharray: dash
1707
+ }
1708
+ ),
1709
+ /* @__PURE__ */ jsx(
1710
+ Path,
1711
+ {
1712
+ d,
1713
+ fill: "none",
1714
+ stroke: camToneColour(theme, tone) ?? (weight.ink.alpha ? theme.white.a12 : theme.media.ink),
1715
+ strokeWidth: width[weight.ink.width],
1716
+ strokeLinejoin: "round",
1717
+ strokeDasharray: dash
1718
+ }
1719
+ )
1720
+ ] }) : null
1721
+ ]
1722
+ }
1723
+ );
1724
+ }
1725
+ function ObjectLabel({
1726
+ name,
1727
+ conf = 0,
1728
+ state = "identified",
1729
+ box,
1730
+ onOpen,
1731
+ labels,
1732
+ tone: toneProp
1733
+ }) {
1734
+ const theme = useLoamTheme("viewfinder");
1735
+ const t = useViewfinderLabels(labels);
1736
+ const { styles } = useStyles(identifySheet);
1737
+ const tone = toneProp ?? (state === "identified" ? confidenceTone(conf) : "neutral");
1738
+ const pct2 = confidenceLabel(conf);
1739
+ const text = state === "identifying" ? t.identifying : state === "lost" ? t.holdSteady : name;
1740
+ const dot = camToneColour(theme, tone) ?? theme.white.a12;
1741
+ const slot = box ? chipSlot(box) : "above";
1742
+ const [w, setW] = React3.useState(0);
1743
+ const pin = box ? {
1744
+ position: "absolute",
1745
+ left: `${box[0] + box[2] / 2}%`,
1746
+ top: `${slot === "below" ? box[1] + box[3] : box[1]}%`,
1747
+ transform: [
1748
+ { translateX: -w / 2 },
1749
+ { translateY: slot === "above" ? -(theme.ctl.sm + theme.space[4]) : theme.space[4] }
1750
+ ],
1751
+ alignItems: "center"
1752
+ } : null;
1753
+ const pill = /* @__PURE__ */ jsxs(
1754
+ View,
1755
+ {
1756
+ style: styles.label,
1757
+ testID: `loam-object-label-${state}`,
1758
+ onLayout: (e) => setW(e.nativeEvent.layout.width),
1759
+ children: [
1760
+ state === "lost" ? null : /* @__PURE__ */ jsx(View, { style: [styles.dot, { backgroundColor: dot }] }),
1761
+ /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles.labelText, children: text }),
1762
+ state === "identified" ? /* @__PURE__ */ jsx(Text, { style: styles.labelConf, children: pct2 }) : null
1763
+ ]
1764
+ }
1765
+ );
1766
+ if (state !== "identified") {
1767
+ return /* @__PURE__ */ jsx(View, { style: pin, pointerEvents: "none", ...decorativeProps(), children: pill });
1768
+ }
1769
+ return /* @__PURE__ */ jsx(
1770
+ Pressable,
1771
+ {
1772
+ accessibilityRole: "button",
1773
+ accessibilityLabel: t.openResult(name, pct2),
1774
+ hitSlop: Math.max(0, (theme.hit.lg - theme.ctl.sm) / 2),
1775
+ onPress: onOpen,
1776
+ style: pin ?? void 0,
1777
+ children: pill
1778
+ }
1779
+ );
1780
+ }
1781
+ function IdentifyCard({
1782
+ name,
1783
+ sub,
1784
+ conf,
1785
+ thumb,
1786
+ platform = "ios",
1787
+ onOpen,
1788
+ labels,
1789
+ loading = false,
1790
+ tone = "neutral",
1791
+ variant = "glass",
1792
+ elevation = "flat",
1793
+ padding = "md"
1794
+ }) {
1795
+ const theme = useLoamTheme("viewfinder");
1796
+ const t = useViewfinderLabels(labels);
1797
+ const { styles } = useStyles(identifySheet, { platform });
1798
+ const pct2 = confidenceLabel(conf);
1799
+ return /* @__PURE__ */ jsxs(
1800
+ Pressable,
1801
+ {
1802
+ accessibilityRole: "button",
1803
+ accessibilityLabel: t.openResult(name, pct2),
1804
+ onPress: loading ? void 0 : onOpen,
1805
+ accessibilityState: loading ? { busy: true } : void 0,
1806
+ testID: `loam-identify-card-${platform}`,
1807
+ style: [
1808
+ styles.card,
1809
+ { paddingHorizontal: theme.space[padding === "sm" ? 8 : padding === "lg" ? 16 : 12] },
1810
+ variant === "solid" ? { backgroundColor: theme.media.ink, borderColor: theme.media.ink } : null,
1811
+ camToneEdge(theme, tone),
1812
+ variant === "outline" ? { backgroundColor: "transparent" } : null,
1813
+ elevation === "default" ? theme.shadow.sm : elevation === "raised" || variant === "elevated" && elevation === "flat" ? theme.shadow.md : null
1814
+ ],
1815
+ ...busyProps(loading),
1816
+ children: [
1817
+ /* @__PURE__ */ jsx(View, { style: styles.thumb, ...decorativeProps(), children: thumb }),
1818
+ /* @__PURE__ */ jsxs(View, { style: styles.cardText, children: [
1819
+ /* @__PURE__ */ jsx(
1820
+ Text,
1821
+ {
1822
+ numberOfLines: 1,
1823
+ style: [styles.cardName, variant === "solid" ? { color: theme.media.onInk } : null],
1824
+ children: name
1825
+ }
1826
+ ),
1827
+ sub ? /* @__PURE__ */ jsx(
1828
+ Text,
1829
+ {
1830
+ numberOfLines: 1,
1831
+ style: [styles.cardSub, variant === "solid" ? { color: theme.media.onInk } : null],
1832
+ children: sub
1833
+ }
1834
+ ) : null
1835
+ ] }),
1836
+ /* @__PURE__ */ jsx(View, { ...decorativeProps(), children: loading ? /* @__PURE__ */ jsx(BusySpinner, { color: variant === "solid" ? theme.media.onInk : camInk(theme) }) : /* @__PURE__ */ jsx(Badge, { variant: confidenceTone(conf), size: "sm", children: pct2 }) }),
1837
+ /* @__PURE__ */ jsx(
1838
+ Icon,
1839
+ {
1840
+ name: "chevron-up",
1841
+ size: theme.icon.md,
1842
+ color: variant === "solid" ? theme.media.onInk : camInk(theme)
1843
+ }
1844
+ )
1845
+ ]
1846
+ }
1847
+ );
1848
+ }
1849
+ var identifySheet = createStyleSheet((theme) => ({
1850
+ root: {
1851
+ pointerEvents: "none",
1852
+ position: "absolute",
1853
+ top: theme.space[0],
1854
+ bottom: theme.space[0],
1855
+ left: theme.space[0],
1856
+ right: theme.space[0]
1857
+ },
1858
+ busyCentre: {
1859
+ pointerEvents: "none",
1860
+ position: "absolute",
1861
+ top: theme.space[0],
1862
+ bottom: theme.space[0],
1863
+ left: theme.space[0],
1864
+ right: theme.space[0],
1865
+ alignItems: "center",
1866
+ justifyContent: "center"
1867
+ },
1868
+ label: {
1869
+ flexDirection: "row",
1870
+ alignItems: "center",
1871
+ gap: theme.space[8],
1872
+ height: theme.ctl.sm,
1873
+ paddingHorizontal: theme.space[12],
1874
+ borderRadius: theme.radius.full,
1875
+ backgroundColor: theme.black.a13,
1876
+ borderWidth: theme.borderWidth.base,
1877
+ borderColor: theme.white.a5
1878
+ },
1879
+ dot: {
1880
+ width: theme.space[8],
1881
+ height: theme.space[8],
1882
+ borderRadius: theme.radius.full
1883
+ },
1884
+ labelText: {
1885
+ fontFamily: theme.font.sans,
1886
+ fontSize: theme.fontSize[13],
1887
+ fontWeight: theme.fontWeight.semibold,
1888
+ color: camInk(theme),
1889
+ flexShrink: 1
1890
+ },
1891
+ labelConf: {
1892
+ fontFamily: theme.font.sans,
1893
+ fontSize: theme.fontSize[13],
1894
+ color: theme.white.a14
1895
+ },
1896
+ card: {
1897
+ flexDirection: "row",
1898
+ alignItems: "center",
1899
+ gap: theme.space[12],
1900
+ paddingHorizontal: theme.space[12],
1901
+ backgroundColor: theme.black.a13,
1902
+ borderWidth: theme.borderWidth.base,
1903
+ borderColor: theme.white.a5,
1904
+ variants: {
1905
+ platform: {
1906
+ ios: { height: theme.space[64], borderRadius: theme.radius.lg },
1907
+ android: { height: theme.space[72], borderRadius: theme.space[20] }
1908
+ }
1909
+ }
1910
+ },
1911
+ thumb: {
1912
+ overflow: "hidden",
1913
+ alignItems: "center",
1914
+ justifyContent: "center",
1915
+ variants: {
1916
+ platform: {
1917
+ ios: { width: theme.space[44], height: theme.space[44], borderRadius: theme.space[10] },
1918
+ android: { width: theme.space[48], height: theme.space[48], borderRadius: theme.radius.md }
1919
+ }
1920
+ }
1921
+ },
1922
+ cardText: {
1923
+ flexGrow: 1,
1924
+ flexShrink: 1,
1925
+ minWidth: theme.space[0],
1926
+ gap: theme.space[2]
1927
+ },
1928
+ cardName: {
1929
+ fontFamily: theme.font.sans,
1930
+ fontSize: theme.fontSize[14],
1931
+ fontWeight: theme.fontWeight.semibold,
1932
+ color: camInk(theme)
1933
+ },
1934
+ cardSub: {
1935
+ fontFamily: theme.font.sans,
1936
+ fontSize: theme.fontSize[12],
1937
+ color: theme.white.a14
1938
+ }
1939
+ }));
1940
+ function ViewfinderModes({
1941
+ modes,
1942
+ value,
1943
+ onChange,
1944
+ platform,
1945
+ label = "Mode",
1946
+ testID,
1947
+ tone = "neutral",
1948
+ loading = false,
1949
+ disabled = false,
1950
+ size = "md",
1951
+ variant,
1952
+ orientation = "horizontal",
1953
+ fullWidth = false,
1954
+ density = "comfortable"
1955
+ }) {
1956
+ const theme = useLoamTheme("viewfinder");
1957
+ const accent = camToneColour(theme, tone);
1958
+ const blocked = disabled || loading;
1959
+ const chipHeight = size === "sm" ? theme.space[24] : size === "lg" ? theme.ctl.lg : theme.space[32];
1960
+ const { styles } = useStyles(modesSheet);
1961
+ const which = platform ?? (isAndroidIdiom(theme) ? "android" : "ios");
1962
+ const strip = variant ?? (which === "android" ? "glass" : "text");
1963
+ const chips = strip !== "text";
1964
+ return /* @__PURE__ */ jsx(
1965
+ View,
1966
+ {
1967
+ accessibilityRole: "radiogroup",
1968
+ accessibilityLabel: label,
1969
+ testID,
1970
+ style: [
1971
+ styles.row,
1972
+ chips ? styles.capsule : styles.strip,
1973
+ chips && strip === "glass" ? camGlass(theme) : null,
1974
+ chips && strip === "plain" ? { borderColor: "transparent" } : null,
1975
+ orientation === "vertical" ? { flexDirection: "column" } : null,
1976
+ density === "compact" ? { gap: chips ? theme.space[0] : theme.space[12] } : null,
1977
+ fullWidth ? { alignSelf: "stretch", justifyContent: "space-around" } : null,
1978
+ disabled ? { opacity: theme.state.disabledOpacity } : busyStyle(theme, loading)
1979
+ ],
1980
+ ...busyProps(loading),
1981
+ children: modes.map((m) => {
1982
+ const on = m.id === value;
1983
+ return /* @__PURE__ */ jsx(
1984
+ Pressable,
1985
+ {
1986
+ accessibilityRole: "radio",
1987
+ accessibilityLabel: m.label,
1988
+ accessibilityState: {
1989
+ checked: on,
1990
+ ...disabled ? { disabled: true } : null,
1991
+ ...loading ? { busy: true } : null
1992
+ },
1993
+ disabled: blocked,
1994
+ onPress: () => onChange?.(m.id),
1995
+ hitSlop: Math.max(0, (theme.hit.lg - (chips ? theme.ctl.sm + 2 : 24)) / 2),
1996
+ style: [
1997
+ chips ? styles.chip : styles.word,
1998
+ chips ? { height: chipHeight } : null,
1999
+ chips && on ? styles.chipOn : null,
2000
+ chips && on && accent ? { backgroundColor: accent } : null
2001
+ ],
2002
+ "aria-checked": on,
2003
+ children: /* @__PURE__ */ jsx(
2004
+ Text,
2005
+ {
2006
+ style: chips ? [styles.chipText, on ? styles.chipTextOn : styles.chipTextRest] : [
2007
+ styles.wordText,
2008
+ on ? styles.wordTextOn : styles.wordTextRest,
2009
+ on && accent ? { color: accent } : null
2010
+ ],
2011
+ children: chips ? m.label : m.label.toUpperCase()
2012
+ }
2013
+ )
2014
+ },
2015
+ m.id
2016
+ );
2017
+ })
2018
+ }
2019
+ );
2020
+ }
2021
+ var modesSheet = createStyleSheet((theme) => ({
2022
+ row: { flexDirection: "row", alignItems: "center", justifyContent: "center" },
2023
+ strip: { gap: theme.space[22] },
2024
+ capsule: {
2025
+ alignSelf: "center",
2026
+ gap: theme.space[2],
2027
+ padding: theme.space[2],
2028
+ borderRadius: theme.radius.full,
2029
+ borderWidth: theme.borderWidth.base,
2030
+ borderColor: theme.white.a5
2031
+ },
2032
+ word: { minHeight: theme.space[24], justifyContent: "center" },
2033
+ wordText: {
2034
+ fontFamily: theme.font.sans,
2035
+ fontSize: theme.fontSize[12],
2036
+ fontWeight: theme.fontWeight.bold,
2037
+ letterSpacing: theme.tracking.wider * theme.fontSize[12]
2038
+ },
2039
+ wordTextOn: { color: theme.media.ink },
2040
+ wordTextRest: { color: theme.white.a13 },
2041
+ chip: {
2042
+ height: theme.space[32],
2043
+ paddingHorizontal: theme.space[14],
2044
+ borderRadius: theme.radius.full,
2045
+ justifyContent: "center"
2046
+ },
2047
+ chipOn: { backgroundColor: theme.media.ink },
2048
+ chipText: { fontFamily: theme.font.sans, fontSize: theme.fontSize[14] },
2049
+ chipTextOn: { color: theme.media.onInk, fontWeight: theme.fontWeight.semibold },
2050
+ chipTextRest: { color: theme.media.ink, fontWeight: theme.fontWeight.medium }
2051
+ }));
2052
+ function SequenceStrip({
2053
+ total = 6,
2054
+ shots = 0,
2055
+ current = 0,
2056
+ angles,
2057
+ mode = "angles",
2058
+ readLabel,
2059
+ labels,
2060
+ copy,
2061
+ onRedo,
2062
+ onRead,
2063
+ loading = false,
2064
+ tone = "neutral"
2065
+ }) {
2066
+ const t = useViewfinderLabels(labels);
2067
+ const words = useAnalyzerCopy(copy);
2068
+ const theme = useLoamTheme("viewfinder");
2069
+ const { styles } = useStyles(sequenceSheet);
2070
+ const batch = mode === "batch";
2071
+ const count = batch ? Math.max(3, shots + 1) : total;
2072
+ const cells = Array.from({ length: count }, (_, i) => i);
2073
+ return /* @__PURE__ */ jsxs(
2074
+ View,
2075
+ {
2076
+ role: "group",
2077
+ accessibilityLabel: batch ? t.capturedPages : t.captureSequence,
2078
+ style: [styles.strip, camToneEdge(theme, tone), busyStyle(theme, loading)],
2079
+ pointerEvents: loading ? "none" : void 0,
2080
+ ...busyProps(loading),
2081
+ children: [
2082
+ /* @__PURE__ */ jsx(
2083
+ ScrollView,
2084
+ {
2085
+ horizontal: true,
2086
+ showsHorizontalScrollIndicator: false,
2087
+ contentContainerStyle: styles.railContent,
2088
+ style: styles.rail,
2089
+ children: cells.map((i) => {
2090
+ const done = i < shots;
2091
+ const isCurrent = !done && i === current;
2092
+ const name = batch ? words.viewfinder.pageN(i + 1) : angles?.[i]?.label ?? words.viewfinder.angleN(i + 1);
2093
+ const label = done ? t.stepCaptured(name) : name;
2094
+ if (done) {
2095
+ return /* @__PURE__ */ jsx(
2096
+ Pressable,
2097
+ {
2098
+ accessibilityRole: "button",
2099
+ accessibilityLabel: label,
2100
+ style: styles.cellDone,
2101
+ hitSlop: (theme.hit.lg - theme.ctl.sm) / 2,
2102
+ onPress: () => onRedo?.(i),
2103
+ children: /* @__PURE__ */ jsx(
2104
+ Icon,
2105
+ {
2106
+ name: "check",
2107
+ size: theme.icon.sm,
2108
+ color: theme.color.goodInk,
2109
+ strokeWidth: theme.icon.strokeBold
2110
+ }
2111
+ )
2112
+ },
2113
+ i
2114
+ );
2115
+ }
2116
+ return /* @__PURE__ */ jsx(
2117
+ View,
2118
+ {
2119
+ accessible: true,
2120
+ accessibilityLabel: label,
2121
+ style: [styles.cellPending, isCurrent ? styles.cellCurrent : null],
2122
+ children: /* @__PURE__ */ jsx(Text, { style: styles.cellNumber, accessible: false, children: String(i + 1) })
2123
+ },
2124
+ i
2125
+ );
2126
+ })
2127
+ }
2128
+ ),
2129
+ batch && shots > 0 ? (
2130
+ // Pinned: outside the scroller, so eleven pages cannot push it off the
2131
+ // end of the rail.
2132
+ /* @__PURE__ */ jsx(
2133
+ Pressable,
2134
+ {
2135
+ accessibilityRole: "button",
2136
+ style: styles.pinned,
2137
+ hitSlop: (theme.hit.lg - theme.ctl.sm) / 2,
2138
+ onPress: onRead,
2139
+ children: /* @__PURE__ */ jsx(Text, { style: styles.pinnedLabel, children: readLabel ?? readBatchLabel(shots, words) })
2140
+ }
2141
+ )
2142
+ ) : null
2143
+ ]
2144
+ }
2145
+ );
2146
+ }
2147
+ var EV_STOPS = Array.from(
2148
+ { length: 13 },
2149
+ (_, i) => Math.round((i - 6) / 3 * 100) / 100
2150
+ );
2151
+ function evLabel(v, locale) {
2152
+ if (v === 0) return "0";
2153
+ return new Intl.NumberFormat(locale, {
2154
+ minimumFractionDigits: 1,
2155
+ maximumFractionDigits: 1,
2156
+ signDisplay: "exceptZero"
2157
+ }).format(v);
2158
+ }
2159
+ function groupNames(expert) {
2160
+ return {
2161
+ ev: expert[1]?.name ?? "EV compensation",
2162
+ torch: expert[3]?.name ?? "Torch level",
2163
+ format: expert[4]?.name ?? "Resolution and format",
2164
+ ae: expert[0]?.name ?? "Exposure lock",
2165
+ af: expert[2]?.name ?? "Focus lock",
2166
+ gridLevel: expert[5]?.name ?? "Grid and level"
2167
+ };
2168
+ }
2169
+ function Stop2({
2170
+ on,
2171
+ label,
2172
+ onPick
2173
+ }) {
2174
+ const theme = useLoamTheme("viewfinder");
2175
+ const { styles } = useStyles(sequenceSheet, { on });
2176
+ return /* @__PURE__ */ jsx(
2177
+ Pressable,
2178
+ {
2179
+ accessibilityRole: "button",
2180
+ accessibilityLabel: label,
2181
+ accessibilityState: { selected: on },
2182
+ style: styles.stop,
2183
+ hitSlop: Math.max(0, (theme.hit.lg - theme.ctl.md) / 2),
2184
+ onPress: onPick,
2185
+ ...pressedProps(on),
2186
+ children: /* @__PURE__ */ jsx(Text, { style: [styles.stopLabel, { color: on ? theme.media.onInk : camInk(theme) }], children: label })
2187
+ }
2188
+ );
2189
+ }
2190
+ function ExpertPanel({
2191
+ platform = "ios",
2192
+ values = {},
2193
+ labels,
2194
+ copy,
2195
+ onChange,
2196
+ onClose,
2197
+ loading = false,
2198
+ tone = "neutral"
2199
+ }) {
2200
+ const t = useViewfinderLabels(labels);
2201
+ const words = useAnalyzerCopy(copy);
2202
+ const locale = useLoamLocale();
2203
+ const GROUP = groupNames(words.expert);
2204
+ const theme = useLoamTheme("viewfinder");
2205
+ const { styles } = useStyles(sequenceSheet);
2206
+ const {
2207
+ ev = 0,
2208
+ torch = "off",
2209
+ format = "pipeline",
2210
+ aeLock = false,
2211
+ afLock = false,
2212
+ level = false,
2213
+ grid = false
2214
+ } = values;
2215
+ const toggles = [
2216
+ [GROUP.ae, aeLock, "aeLock"],
2217
+ [GROUP.af, afLock, "afLock"],
2218
+ [t.level, level, "level"],
2219
+ [t.grid, grid, "grid"]
2220
+ ];
2221
+ return /* @__PURE__ */ jsxs(
2222
+ View,
2223
+ {
2224
+ role: "group",
2225
+ accessibilityLabel: t.expertControls,
2226
+ style: [styles.panel, camToneEdge(theme, tone), busyStyle(theme, loading)],
2227
+ pointerEvents: loading ? "none" : void 0,
2228
+ ...busyProps(loading),
2229
+ children: [
2230
+ /* @__PURE__ */ jsxs(View, { style: styles.panelHead, children: [
2231
+ /* @__PURE__ */ jsx(Text, { style: [styles.panelTitle, { color: camInk(theme) }], children: t.expert }),
2232
+ /* @__PURE__ */ jsx(View, { style: styles.panelHeadEnd, children: onClose ? /* @__PURE__ */ jsx(GlassIconButton, { icon: "x", label: t.closeExpert, onPress: onClose }) : null })
2233
+ ] }),
2234
+ /* @__PURE__ */ jsxs(View, { role: "group", accessibilityLabel: GROUP.ev, style: styles.group, children: [
2235
+ /* @__PURE__ */ jsx(Text, { style: [styles.groupLabel, camMeta(theme)], children: GROUP.ev.toLocaleUpperCase(locale) }),
2236
+ /* @__PURE__ */ jsx(
2237
+ ScrollView,
2238
+ {
2239
+ horizontal: true,
2240
+ showsHorizontalScrollIndicator: false,
2241
+ contentContainerStyle: styles.stopRow,
2242
+ children: EV_STOPS.map((stop) => /* @__PURE__ */ jsx(
2243
+ Stop2,
2244
+ {
2245
+ on: stop === ev,
2246
+ label: evLabel(stop, locale),
2247
+ onPick: () => onChange?.({ control: "ev", value: stop })
2248
+ },
2249
+ stop
2250
+ ))
2251
+ }
2252
+ )
2253
+ ] }),
2254
+ /* @__PURE__ */ jsxs(View, { role: "group", accessibilityLabel: GROUP.torch, style: styles.group, children: [
2255
+ /* @__PURE__ */ jsx(Text, { style: [styles.groupLabel, camMeta(theme)], children: GROUP.torch.toLocaleUpperCase(locale) }),
2256
+ /* @__PURE__ */ jsx(View, { style: styles.stopRow, children: ["off", "low", "high"].map((lvl) => /* @__PURE__ */ jsx(
2257
+ Stop2,
2258
+ {
2259
+ on: lvl === torch,
2260
+ label: t.torchLevels[lvl],
2261
+ onPick: () => onChange?.({ control: "torch", value: lvl })
2262
+ },
2263
+ lvl
2264
+ )) })
2265
+ ] }),
2266
+ /* @__PURE__ */ jsxs(View, { role: "group", accessibilityLabel: GROUP.format, style: styles.group, children: [
2267
+ /* @__PURE__ */ jsx(Text, { style: [styles.groupLabel, camMeta(theme)], children: GROUP.format.toLocaleUpperCase(locale) }),
2268
+ /* @__PURE__ */ jsx(View, { style: styles.stopRow, children: ["pipeline", "full"].map((f) => /* @__PURE__ */ jsx(
2269
+ Stop2,
2270
+ {
2271
+ on: f === format,
2272
+ label: t.formats[f],
2273
+ onPick: () => onChange?.({ control: "format", value: f })
2274
+ },
2275
+ f
2276
+ )) })
2277
+ ] }),
2278
+ /* @__PURE__ */ jsx(
2279
+ View,
2280
+ {
2281
+ role: "group",
2282
+ accessibilityLabel: GROUP.gridLevel,
2283
+ style: styles.toggleRow,
2284
+ testID: `loam-expert-${platform}`,
2285
+ children: toggles.map(([label, on, control]) => /* @__PURE__ */ jsx(
2286
+ Stop2,
2287
+ {
2288
+ on,
2289
+ label,
2290
+ onPick: () => onChange?.({ control, value: !on })
2291
+ },
2292
+ control
2293
+ ))
2294
+ }
2295
+ )
2296
+ ]
2297
+ }
2298
+ );
2299
+ }
2300
+ var sequenceSheet = createStyleSheet((theme) => ({
2301
+ strip: {
2302
+ flexDirection: "row",
2303
+ alignItems: "center",
2304
+ gap: theme.space[8]
2305
+ },
2306
+ rail: {
2307
+ flexGrow: 1,
2308
+ flexShrink: 1,
2309
+ flexBasis: theme.space[0]
2310
+ },
2311
+ railContent: {
2312
+ flexDirection: "row",
2313
+ alignItems: "center",
2314
+ gap: theme.space[6]
2315
+ },
2316
+ cellDone: {
2317
+ width: theme.ctl.sm,
2318
+ height: theme.ctl.sm,
2319
+ flexGrow: 0,
2320
+ flexShrink: 0,
2321
+ alignItems: "center",
2322
+ justifyContent: "center",
2323
+ borderRadius: theme.radius.sm,
2324
+ backgroundColor: theme.color.good,
2325
+ borderWidth: theme.borderWidth.base,
2326
+ borderColor: theme.white.a5
2327
+ },
2328
+ cellPending: {
2329
+ width: theme.ctl.sm,
2330
+ height: theme.ctl.sm,
2331
+ flexGrow: 0,
2332
+ flexShrink: 0,
2333
+ alignItems: "center",
2334
+ justifyContent: "center",
2335
+ borderRadius: theme.radius.sm,
2336
+ backgroundColor: theme.black.a12,
2337
+ borderWidth: theme.borderWidth.base,
2338
+ borderColor: theme.white.a5
2339
+ },
2340
+ cellCurrent: {
2341
+ borderWidth: theme.borderWidth.strong,
2342
+ borderColor: theme.media.ink
2343
+ },
2344
+ cellNumber: {
2345
+ fontFamily: theme.font.sans,
2346
+ fontSize: theme.fontSize[11],
2347
+ fontVariant: ["tabular-nums"],
2348
+ color: theme.media.ink
2349
+ },
2350
+ pinned: {
2351
+ flexGrow: 0,
2352
+ flexShrink: 0,
2353
+ height: theme.ctl.sm,
2354
+ alignItems: "center",
2355
+ justifyContent: "center",
2356
+ paddingHorizontal: theme.space[12],
2357
+ borderRadius: theme.radius.sm,
2358
+ backgroundColor: theme.media.ink
2359
+ },
2360
+ pinnedLabel: {
2361
+ fontFamily: theme.font.sans,
2362
+ fontSize: theme.fontSize[13],
2363
+ fontWeight: theme.fontWeight.semibold,
2364
+ color: theme.media.onInk
2365
+ },
2366
+ panel: {
2367
+ flexDirection: "column",
2368
+ gap: theme.space[16],
2369
+ padding: theme.space[16],
2370
+ borderRadius: theme.radius.lg,
2371
+ backgroundColor: theme.black.a12,
2372
+ borderWidth: theme.borderWidth.base,
2373
+ borderColor: theme.white.a5
2374
+ },
2375
+ panelHead: {
2376
+ flexDirection: "row",
2377
+ alignItems: "center",
2378
+ gap: theme.space[12]
2379
+ },
2380
+ panelHeadEnd: {
2381
+ marginStart: "auto"
2382
+ },
2383
+ panelTitle: {
2384
+ fontFamily: theme.font.sans,
2385
+ fontSize: theme.fontSize[13]
2386
+ },
2387
+ group: {
2388
+ flexDirection: "column",
2389
+ gap: theme.space[8]
2390
+ },
2391
+ groupLabel: {
2392
+ fontSize: theme.fontSize[11],
2393
+ fontWeight: theme.fontWeight.bold
2394
+ },
2395
+ stopRow: {
2396
+ flexDirection: "row",
2397
+ alignItems: "center",
2398
+ gap: theme.space[8]
2399
+ },
2400
+ toggleRow: {
2401
+ flexDirection: "row",
2402
+ flexWrap: "wrap",
2403
+ alignItems: "center",
2404
+ gap: theme.space[8]
2405
+ },
2406
+ stop: {
2407
+ height: theme.ctl.md,
2408
+ minWidth: theme.ctl.md,
2409
+ flexGrow: 0,
2410
+ flexShrink: 0,
2411
+ alignItems: "center",
2412
+ justifyContent: "center",
2413
+ paddingHorizontal: theme.space[12],
2414
+ borderRadius: theme.radius.sm,
2415
+ borderWidth: theme.borderWidth.base,
2416
+ borderColor: theme.white.a5,
2417
+ variants: {
2418
+ on: {
2419
+ true: { backgroundColor: theme.media.ink, borderColor: theme.media.ink },
2420
+ false: { backgroundColor: theme.black.a12 }
2421
+ }
2422
+ }
2423
+ },
2424
+ stopLabel: {
2425
+ fontFamily: theme.font.sans,
2426
+ fontSize: theme.fontSize[14],
2427
+ fontWeight: theme.fontWeight.semibold,
2428
+ fontVariant: ["tabular-nums"]
2429
+ }
2430
+ }));
2431
+ function ShutterTray({
2432
+ platform = "ios",
2433
+ start,
2434
+ primary,
2435
+ end,
2436
+ stack = false,
2437
+ size = "md",
2438
+ density = "comfortable",
2439
+ orientation = "horizontal",
2440
+ variant = "plain",
2441
+ tone = "neutral",
2442
+ loading = false
2443
+ }) {
2444
+ const { styles } = useStyles(traySheet);
2445
+ const theme = useLoamTheme("viewfinder");
2446
+ const accent = camToneColour(theme, tone);
2447
+ const slot = {
2448
+ width: size === "sm" ? theme.ctl.md : size === "lg" ? theme.space[48] : theme.space[44]
2449
+ };
2450
+ const chrome = [
2451
+ variant === "glass" ? [camGlass(theme), { borderRadius: theme.radius.lg }] : null,
2452
+ accent ? { borderWidth: theme.borderWidth.base, borderColor: accent } : null,
2453
+ density === "compact" ? { gap: theme.space[8], paddingHorizontal: theme.space[8] } : null,
2454
+ busyStyle(theme, loading)
2455
+ ];
2456
+ const secondaries = /* @__PURE__ */ jsxs(Fragment, { children: [
2457
+ /* @__PURE__ */ jsx(View, { style: [styles.slotStart, slot], children: start }),
2458
+ /* @__PURE__ */ jsx(View, { style: styles.slotPrimary, children: stack ? null : primary }),
2459
+ /* @__PURE__ */ jsx(View, { style: [styles.slotEnd, slot], children: end })
2460
+ ] });
2461
+ if (!stack) {
2462
+ return /* @__PURE__ */ jsx(
2463
+ View,
2464
+ {
2465
+ style: [
2466
+ styles.tray,
2467
+ orientation === "vertical" ? { flexDirection: "column" } : null,
2468
+ chrome
2469
+ ],
2470
+ testID: `loam-tray-${platform}`,
2471
+ ...busyProps(loading),
2472
+ children: secondaries
2473
+ }
2474
+ );
2475
+ }
2476
+ return /* @__PURE__ */ jsxs(View, { style: [styles.stackedTray, chrome], testID: `loam-tray-${platform}`, ...busyProps(loading), children: [
2477
+ /* @__PURE__ */ jsx(View, { style: styles.stackedPrimary, children: primary }),
2478
+ /* @__PURE__ */ jsx(View, { style: styles.stackedRow, children: secondaries })
2479
+ ] });
2480
+ }
2481
+ var traySheet = createStyleSheet((theme) => ({
2482
+ // Tight on the block axis: the shutter is the tray's height, and padding
2483
+ // above and below it is preview the user no longer sees.
2484
+ tray: {
2485
+ flexDirection: "row",
2486
+ alignItems: "center",
2487
+ justifyContent: "space-between",
2488
+ gap: theme.space[16],
2489
+ paddingHorizontal: theme.space[16],
2490
+ paddingVertical: theme.space[4]
2491
+ },
2492
+ stackedTray: {
2493
+ flexDirection: "column",
2494
+ gap: theme.space[8],
2495
+ paddingHorizontal: theme.space[16],
2496
+ paddingVertical: theme.space[4]
2497
+ },
2498
+ stackedPrimary: {
2499
+ flexDirection: "row",
2500
+ alignItems: "center",
2501
+ justifyContent: "center"
2502
+ },
2503
+ stackedRow: {
2504
+ flexDirection: "row",
2505
+ alignItems: "center",
2506
+ justifyContent: "space-between",
2507
+ gap: theme.space[16]
2508
+ },
2509
+ slotStart: {
2510
+ width: theme.space[44],
2511
+ flexGrow: 0,
2512
+ flexShrink: 0,
2513
+ flexDirection: "row",
2514
+ alignItems: "center",
2515
+ justifyContent: "flex-start"
2516
+ },
2517
+ slotPrimary: {
2518
+ flexGrow: 1,
2519
+ flexShrink: 1,
2520
+ flexBasis: theme.space[0],
2521
+ flexDirection: "row",
2522
+ alignItems: "center",
2523
+ justifyContent: "center"
2524
+ },
2525
+ slotEnd: {
2526
+ width: theme.space[44],
2527
+ flexGrow: 0,
2528
+ flexShrink: 0,
2529
+ flexDirection: "row",
2530
+ alignItems: "center",
2531
+ justifyContent: "flex-end"
2532
+ }
2533
+ }));
2534
+
2535
+ export { ContinuousNotice, CountdownRing, EV_STOPS, ExpertPanel, FlipButton, FocusIndicator, FocusTapZone, GuideOverlay, IdentifyCard, LensPicker, ObjectHighlight, ObjectLabel, ScanLine, SequenceStrip, ShutterButton, ShutterTray, TorchToggle, TrackChip, TrackCountPill, TrackedBox, TrackingOverlay, ViewfinderGridOverlay, ViewfinderGridToggle, ViewfinderModes };