@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
@@ -1,1635 +0,0 @@
1
- import { camInk, GlassIconButton, decorativeProps, untabbableProps, camMeta, pressedProps } from './chunk-RW6ZL2FQ.js';
2
- import { useReducedMotion } from './chunk-6N33LFQA.js';
3
- import { Icon } from './chunk-TKVFVF5D.js';
4
- import * as React3 from 'react';
5
- import { Animated, View, Text, Pressable, Easing, Dimensions, ScrollView } from 'react-native';
6
- import Svg2, { Path, Circle, Defs, LinearGradient, Stop, Rect, Line } from 'react-native-svg';
7
- import { createStyleSheet, useLoamTheme, useStyles } from '@btndprojects/loam-theme-native';
8
- import { TRACK_BAND_BOTTOM, EXPERT, CONTINUOUS_NOTICE, confidenceTone, TRACKING_MOTION, confidenceLabel, trackCountLabel, trackTone, chipRoom, chipAnchor, chipSlot, visibleChips, MAX_CHIPS, trackingSummaryLabel, readBatchLabel } from '@btndprojects/loam-analyzer';
9
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
10
-
11
- var RING_R = 46;
12
- var RING_C = 2 * Math.PI * RING_R;
13
- var RING_STROKE = 6;
14
- function CountdownRing({
15
- value,
16
- label = "Auto-capturing"
17
- }) {
18
- const theme = useLoamTheme();
19
- const reduced = useReducedMotion();
20
- const { styles } = useStyles(controlSheet);
21
- const pct2 = Math.min(100, Math.max(0, value));
22
- const still = reduced || theme.reduceMotion;
23
- return /* @__PURE__ */ jsx(
24
- View,
25
- {
26
- accessibilityRole: "progressbar",
27
- role: "progressbar",
28
- accessibilityLabel: label,
29
- accessibilityValue: { min: 0, max: 100, now: Math.round(pct2) },
30
- style: styles.ringRoot,
31
- ...{
32
- "aria-valuenow": Math.round(pct2),
33
- "aria-valuemin": 0,
34
- "aria-valuemax": 100
35
- },
36
- children: still ? /* @__PURE__ */ jsx(Text, { style: styles.ringNumber, children: String(Math.round(pct2)) }) : /* @__PURE__ */ jsx(Svg2, { width: "100%", height: "100%", viewBox: "0 0 100 100", children: /* @__PURE__ */ jsx(
37
- Circle,
38
- {
39
- cx: 50,
40
- cy: 50,
41
- r: RING_R,
42
- stroke: theme.color.good,
43
- strokeWidth: RING_STROKE,
44
- strokeLinecap: "round",
45
- strokeDasharray: RING_C,
46
- strokeDashoffset: RING_C * (1 - pct2 / 100),
47
- fill: "none",
48
- transform: "rotate(-90 50 50)"
49
- }
50
- ) })
51
- }
52
- );
53
- }
54
- function ShutterButton({
55
- enabled = true,
56
- mode = "manual",
57
- platform = "web",
58
- countdown = null,
59
- blockedToast,
60
- label = "Capture",
61
- onPress,
62
- onBlocked
63
- }) {
64
- const theme = useLoamTheme();
65
- const { styles } = useStyles(controlSheet, { platform, enabled });
66
- const glyphColour = enabled ? theme.media.onInk : camInk(theme);
67
- if (mode === "continuous") return null;
68
- return /* @__PURE__ */ jsxs(
69
- Pressable,
70
- {
71
- accessibilityRole: "button",
72
- accessibilityLabel: label,
73
- accessibilityState: { disabled: !enabled },
74
- testID: enabled ? "loam-shutter-open" : "loam-shutter-blocked",
75
- style: styles.shutter,
76
- onPress: () => {
77
- if (!enabled) {
78
- onBlocked?.(blockedToast ?? "");
79
- return;
80
- }
81
- onPress?.();
82
- },
83
- children: [
84
- /* @__PURE__ */ jsx(View, { style: styles.shutterFill, children: /* @__PURE__ */ jsx(
85
- Icon,
86
- {
87
- name: enabled ? "circle" : "lock",
88
- size: enabled ? theme.icon.lg : theme.icon.md,
89
- color: glyphColour
90
- }
91
- ) }),
92
- typeof countdown === "number" ? /* @__PURE__ */ jsx(CountdownRing, { value: countdown }) : null
93
- ]
94
- }
95
- );
96
- }
97
- function ContinuousNotice({
98
- text = CONTINUOUS_NOTICE
99
- }) {
100
- const theme = useLoamTheme();
101
- const { styles } = useStyles(controlSheet);
102
- const ink = camInk(theme);
103
- return /* @__PURE__ */ jsxs(View, { style: styles.notice, children: [
104
- /* @__PURE__ */ jsx(Icon, { name: "barcode", size: theme.icon.sm, color: ink }),
105
- /* @__PURE__ */ jsx(Text, { style: [styles.noticeText, { color: ink }], children: text })
106
- ] });
107
- }
108
- function TorchToggle({
109
- on = false,
110
- available = true,
111
- label = "Torch",
112
- onChange
113
- }) {
114
- if (!available) return null;
115
- return /* @__PURE__ */ jsx(
116
- GlassIconButton,
117
- {
118
- icon: "flash",
119
- label,
120
- on,
121
- onPress: () => onChange?.(!on)
122
- }
123
- );
124
- }
125
- function GridToggle({
126
- on = false,
127
- label = "Grid",
128
- onChange
129
- }) {
130
- return /* @__PURE__ */ jsx(GlassIconButton, { icon: "grid", label, on, onPress: () => onChange?.(!on) });
131
- }
132
- function FlipButton({
133
- label = "Flip camera",
134
- onFlip
135
- }) {
136
- return /* @__PURE__ */ jsx(GlassIconButton, { icon: "flip", label, onPress: onFlip });
137
- }
138
- function LensStop({
139
- stop,
140
- on,
141
- onPick
142
- }) {
143
- const theme = useLoamTheme();
144
- const { styles } = useStyles(controlSheet, { on });
145
- return /* @__PURE__ */ jsx(
146
- Pressable,
147
- {
148
- accessibilityRole: "button",
149
- accessibilityLabel: `${stop}x`,
150
- accessibilityState: { selected: on },
151
- style: styles.lensStop,
152
- hitSlop: Math.max(0, (theme.hit.lg - theme.ctl.md) / 2),
153
- onPress: onPick,
154
- ...pressedProps(on),
155
- children: /* @__PURE__ */ jsx(Text, { style: [styles.lensLabel, { color: on ? theme.media.onInk : camInk(theme) }], children: `${stop}x` })
156
- }
157
- );
158
- }
159
- function LensPicker({
160
- stops = [2, 1, 0.5],
161
- value = 1,
162
- label = "Zoom",
163
- onChange
164
- }) {
165
- const { styles } = useStyles(controlSheet);
166
- return /* @__PURE__ */ jsx(View, { role: "group", accessibilityLabel: label, style: styles.lensColumn, children: stops.map((stop) => /* @__PURE__ */ jsx(LensStop, { stop, on: stop === value, onPick: () => onChange?.(stop) }, stop)) });
167
- }
168
- var controlSheet = createStyleSheet((theme) => ({
169
- ringRoot: {
170
- pointerEvents: "none",
171
- position: "absolute",
172
- top: theme.space[0],
173
- bottom: theme.space[0],
174
- left: theme.space[0],
175
- right: theme.space[0],
176
- alignItems: "center",
177
- justifyContent: "center"
178
- },
179
- ringNumber: {
180
- fontFamily: theme.font.sans,
181
- fontSize: theme.fontSize[13],
182
- fontVariant: ["tabular-nums"],
183
- color: theme.color.good
184
- },
185
- shutter: {
186
- flexGrow: 0,
187
- flexShrink: 0,
188
- alignItems: "center",
189
- justifyContent: "center",
190
- borderWidth: theme.borderWidth.strong,
191
- variants: {
192
- platform: {
193
- ios: { width: theme.space[76], height: theme.space[76], borderRadius: theme.radius.full },
194
- android: {
195
- width: theme.space[72],
196
- height: theme.space[72],
197
- borderRadius: theme.radius["2xl"]
198
- },
199
- web: {
200
- width: theme.space[68],
201
- height: theme.space[68],
202
- borderRadius: theme.radius["2xl"]
203
- }
204
- },
205
- enabled: {
206
- true: { borderColor: theme.media.ink, opacity: theme.opacity[100] },
207
- // Dimmed and inert. Still reachable, still named, still able to say why.
208
- false: { borderColor: theme.white.a8, opacity: theme.state.disabledOpacity }
209
- }
210
- }
211
- },
212
- shutterFill: {
213
- width: "100%",
214
- height: "100%",
215
- alignItems: "center",
216
- justifyContent: "center",
217
- borderRadius: theme.radius.full,
218
- variants: {
219
- enabled: {
220
- true: { backgroundColor: theme.media.ink },
221
- false: {
222
- backgroundColor: theme.black.a12,
223
- borderWidth: theme.borderWidth.base,
224
- borderColor: theme.white.a5
225
- }
226
- }
227
- }
228
- },
229
- notice: {
230
- flexDirection: "row",
231
- alignItems: "center",
232
- justifyContent: "center",
233
- gap: theme.space[8],
234
- minHeight: theme.ctl.lg,
235
- // A sentence in a control-sized box: it takes the width it is given rather
236
- // than hugging its own text, and the padding stays modest so the words get
237
- // that width instead of the box.
238
- alignSelf: "stretch",
239
- paddingHorizontal: theme.space[12],
240
- paddingVertical: theme.space[8],
241
- borderRadius: theme.radius.sm,
242
- backgroundColor: theme.black.a12,
243
- borderWidth: theme.borderWidth.base,
244
- borderColor: theme.white.a5
245
- },
246
- noticeText: {
247
- fontFamily: theme.font.sans,
248
- fontSize: theme.fontSize[13],
249
- lineHeight: theme.fontSize[18],
250
- textAlign: "center",
251
- flexShrink: 1
252
- },
253
- lensColumn: {
254
- flexDirection: "row",
255
- alignItems: "center",
256
- alignSelf: "center",
257
- gap: theme.space[2],
258
- padding: theme.space[4],
259
- borderRadius: theme.radius.full,
260
- backgroundColor: theme.black.a12,
261
- borderWidth: theme.borderWidth.base,
262
- borderColor: theme.white.a5
263
- },
264
- lensStop: {
265
- width: theme.ctl.md,
266
- height: theme.ctl.md,
267
- flexGrow: 0,
268
- flexShrink: 0,
269
- alignItems: "center",
270
- justifyContent: "center",
271
- borderRadius: theme.radius.full,
272
- variants: {
273
- on: {
274
- true: { backgroundColor: theme.media.ink },
275
- false: {}
276
- }
277
- }
278
- },
279
- lensLabel: {
280
- fontFamily: theme.font.sans,
281
- fontSize: theme.fontSize[11],
282
- fontWeight: theme.fontWeight.medium,
283
- fontVariant: ["tabular-nums"]
284
- }
285
- }));
286
- function ScanLine({ active = true, band, travel }) {
287
- const theme = useLoamTheme();
288
- const reduced = useReducedMotion();
289
- const { styles } = useStyles(overlaySheet);
290
- const height = band ?? theme.space[80];
291
- const thickness = theme.borderWidth.heavy;
292
- const distance = travel ?? height - thickness;
293
- const offset = React3.useRef(new Animated.Value(0)).current;
294
- const still = reduced || theme.reduceMotion;
295
- React3.useEffect(() => {
296
- if (!active || still) {
297
- offset.setValue(0);
298
- return;
299
- }
300
- const half = theme.loop.beacon;
301
- const leg = (to) => Animated.timing(offset, {
302
- toValue: to,
303
- duration: half,
304
- easing: Easing.bezier(...theme.easing.inOut),
305
- useNativeDriver: true
306
- });
307
- const loop = Animated.loop(Animated.sequence([leg(1), leg(0)]));
308
- loop.start();
309
- return () => loop.stop();
310
- }, [active, still, offset, theme.loop.beacon, theme.easing.inOut]);
311
- if (!active) return null;
312
- const translateY = still ? distance / 2 : offset.interpolate({ inputRange: [0, 1], outputRange: [0, distance] });
313
- return /* @__PURE__ */ jsx(
314
- View,
315
- {
316
- accessible: false,
317
- testID: still ? "loam-scan-band-static" : "loam-scan-band",
318
- style: [styles.scanBand, { height }],
319
- ...decorativeProps(),
320
- children: /* @__PURE__ */ jsx(
321
- Animated.View,
322
- {
323
- style: [styles.scanLine, { height: thickness, transform: [{ translateY }] }],
324
- children: /* @__PURE__ */ jsxs(Svg2, { width: "100%", height: thickness, children: [
325
- /* @__PURE__ */ jsx(Defs, { children: /* @__PURE__ */ jsxs(LinearGradient, { id: "loam-cam-scan", x1: "0", y1: "0", x2: "1", y2: "0", children: [
326
- /* @__PURE__ */ jsx(Stop, { offset: "0", stopColor: theme.color.good, stopOpacity: theme.opacity[0] }),
327
- /* @__PURE__ */ jsx(Stop, { offset: "0.5", stopColor: theme.color.good, stopOpacity: theme.opacity[100] }),
328
- /* @__PURE__ */ jsx(Stop, { offset: "1", stopColor: theme.color.good, stopOpacity: theme.opacity[0] })
329
- ] }) }),
330
- /* @__PURE__ */ jsx(Rect, { x: "0", y: "0", width: "100%", height: thickness, fill: "url(#loam-cam-scan)" })
331
- ] })
332
- }
333
- )
334
- }
335
- );
336
- }
337
- var GUIDE_BOX = {
338
- quad: { width: "78%", heightFlex: 62, hole: false },
339
- circle: { width: "62%", square: true, hole: true },
340
- line: { width: "84%", hole: true },
341
- silhouette: { width: "86%", heightFlex: 38, hole: false }
342
- };
343
- function Corners({ colour }) {
344
- const { styles } = useStyles(overlaySheet);
345
- return /* @__PURE__ */ jsxs(Fragment, { children: [
346
- /* @__PURE__ */ jsx(View, { style: [styles.cornerTopStart, { borderColor: colour }] }),
347
- /* @__PURE__ */ jsx(View, { style: [styles.cornerTopEnd, { borderColor: colour }] }),
348
- /* @__PURE__ */ jsx(View, { style: [styles.cornerBottomStart, { borderColor: colour }] }),
349
- /* @__PURE__ */ jsx(View, { style: [styles.cornerBottomEnd, { borderColor: colour }] })
350
- ] });
351
- }
352
- function GuideOverlay({
353
- kind,
354
- pass = false,
355
- dimmed = false,
356
- hint,
357
- scanning = true
358
- }) {
359
- const theme = useLoamTheme();
360
- const { styles } = useStyles(overlaySheet, { pass, dimmed });
361
- const snap = React3.useRef(new Animated.Value(pass ? 1 : 0)).current;
362
- React3.useEffect(() => {
363
- Animated.timing(snap, {
364
- toValue: pass ? 1 : 0,
365
- duration: theme.motion.swap.duration,
366
- easing: Easing.bezier(...theme.motion.swap.easing),
367
- useNativeDriver: true
368
- }).start();
369
- }, [pass, snap, theme.motion.swap.duration, theme.motion.swap.easing]);
370
- if (kind === "none") return null;
371
- const box = GUIDE_BOX[kind];
372
- const colour = pass ? theme.color.good : theme.white.a12;
373
- const scrim = box.hole && kind !== "circle" ? theme.black.a9 : void 0;
374
- const reach = Dimensions.get("screen").height;
375
- const bandGrow = box.heightFlex === void 0 ? null : { flexGrow: (100 - box.heightFlex) / 2 };
376
- const scale = snap.interpolate({ inputRange: [0, 1], outputRange: [1, 1.015] });
377
- return /* @__PURE__ */ jsxs(
378
- View,
379
- {
380
- accessible: false,
381
- testID: `loam-guide-${kind}-${pass ? "pass" : "wait"}`,
382
- style: [styles.guideRoot, box.hole ? styles.guideRootBleed : null],
383
- ...decorativeProps(),
384
- children: [
385
- /* @__PURE__ */ jsx(View, { style: [styles.scrimBand, bandGrow, scrim ? { backgroundColor: scrim } : null] }),
386
- /* @__PURE__ */ jsxs(
387
- View,
388
- {
389
- style: [
390
- styles.guideRow,
391
- box.heightFlex === void 0 ? null : { flexGrow: box.heightFlex, flexShrink: 1 }
392
- ],
393
- children: [
394
- /* @__PURE__ */ jsx(View, { style: [styles.scrimSide, scrim ? { backgroundColor: scrim } : null] }),
395
- /* @__PURE__ */ jsxs(
396
- Animated.View,
397
- {
398
- style: [
399
- styles.guideBox,
400
- { width: box.width, transform: [{ scale }] },
401
- box.square ? styles.guideSquare : null,
402
- // A share of the band's height, so the box must take the row's
403
- // height rather than its (absolutely placed) corners' zero.
404
- box.heightFlex === void 0 ? null : styles.guideStretch
405
- ],
406
- children: [
407
- hint ? /* @__PURE__ */ jsx(View, { style: styles.hintWrap, children: /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles.hint, children: hint }) }) : null,
408
- kind === "quad" ? /* @__PURE__ */ jsx(Corners, { colour }) : null,
409
- kind === "circle" ? /* @__PURE__ */ jsxs(Fragment, { children: [
410
- /* @__PURE__ */ jsx(
411
- View,
412
- {
413
- testID: "loam-guide-hole-ring",
414
- style: [
415
- styles.holeRing,
416
- {
417
- borderColor: theme.black.a9,
418
- borderWidth: reach,
419
- // Past half the ring's size, so it clamps to a true circle
420
- // and the inner edge (radius minus border) is the guide's.
421
- // `radius.full` (999) is less than the border, which left
422
- // the hole square.
423
- borderRadius: reach * 2,
424
- top: -reach,
425
- left: -reach,
426
- right: -reach,
427
- bottom: -reach
428
- }
429
- ]
430
- }
431
- ),
432
- /* @__PURE__ */ jsx(View, { style: [styles.circleGuide, { borderColor: colour }] })
433
- ] }) : null,
434
- kind === "line" ? /* @__PURE__ */ jsx(View, { style: [styles.lineGuide, { borderColor: colour }], children: /* @__PURE__ */ jsx(ScanLine, { active: scanning }) }) : null,
435
- kind === "silhouette" ? /* @__PURE__ */ jsxs(Svg2, { viewBox: "0 0 100 44", width: "100%", height: "100%", preserveAspectRatio: "xMidYMid meet", children: [
436
- /* @__PURE__ */ jsx(
437
- Path,
438
- {
439
- 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",
440
- stroke: colour,
441
- strokeWidth: 1,
442
- strokeDasharray: "5 3",
443
- strokeLinejoin: "round",
444
- fill: "none"
445
- }
446
- ),
447
- /* @__PURE__ */ jsx(Circle, { cx: 26, cy: 38, r: 6, stroke: colour, strokeWidth: 1, strokeDasharray: "4 3", fill: "none" }),
448
- /* @__PURE__ */ jsx(Circle, { cx: 76, cy: 38, r: 6, stroke: colour, strokeWidth: 1, strokeDasharray: "4 3", fill: "none" })
449
- ] }) : null
450
- ]
451
- }
452
- ),
453
- /* @__PURE__ */ jsx(View, { style: [styles.scrimSide, scrim ? { backgroundColor: scrim } : null] })
454
- ]
455
- }
456
- ),
457
- /* @__PURE__ */ jsx(View, { style: [styles.scrimBand, bandGrow, scrim ? { backgroundColor: scrim } : null] })
458
- ]
459
- }
460
- );
461
- }
462
- function GridOverlay({ visible = false }) {
463
- const { styles } = useStyles(overlaySheet);
464
- if (!visible) return null;
465
- return /* @__PURE__ */ jsxs(View, { accessible: false, testID: "loam-grid-overlay", style: styles.gridRoot, ...decorativeProps(), children: [
466
- /* @__PURE__ */ jsx(View, { style: styles.gridV1 }),
467
- /* @__PURE__ */ jsx(View, { style: styles.gridV2 }),
468
- /* @__PURE__ */ jsx(View, { style: styles.gridH1 }),
469
- /* @__PURE__ */ jsx(View, { style: styles.gridH2 })
470
- ] });
471
- }
472
- function FocusPulse({ point }) {
473
- const theme = useLoamTheme();
474
- const reduced = useReducedMotion();
475
- const { styles } = useStyles(overlaySheet);
476
- const phase = React3.useRef(new Animated.Value(0)).current;
477
- const still = reduced || theme.reduceMotion;
478
- React3.useEffect(() => {
479
- if (still) {
480
- phase.setValue(1);
481
- return;
482
- }
483
- Animated.timing(phase, {
484
- toValue: 1,
485
- duration: theme.duration.slower,
486
- easing: Easing.bezier(...theme.easing.out),
487
- useNativeDriver: true
488
- }).start();
489
- }, [phase, still, theme.duration.slower, theme.easing.out]);
490
- const opacity = still ? theme.opacity[100] : phase.interpolate({ inputRange: [0, 0.3, 1], outputRange: [0, 1, 0] });
491
- const scale = still ? 1 : phase.interpolate({ inputRange: [0, 0.3, 1], outputRange: [1.015, 1, 1] });
492
- return /* @__PURE__ */ jsx(
493
- Animated.View,
494
- {
495
- accessible: false,
496
- testID: "loam-focus-indicator",
497
- style: [
498
- styles.focusBox,
499
- {
500
- left: `${point.x * 100}%`,
501
- top: `${point.y * 100}%`,
502
- borderColor: theme.color.warn,
503
- opacity,
504
- transform: [{ scale }]
505
- }
506
- ],
507
- ...decorativeProps(),
508
- children: /* @__PURE__ */ jsxs(Svg2, { viewBox: "0 0 24 24", width: theme.icon.lg, height: theme.icon.lg, children: [
509
- /* @__PURE__ */ jsx(Line, { x1: 12, y1: 6, x2: 12, y2: 18, stroke: theme.color.warn, strokeWidth: 1 }),
510
- /* @__PURE__ */ jsx(Line, { x1: 6, y1: 12, x2: 18, y2: 12, stroke: theme.color.warn, strokeWidth: 1 })
511
- ] })
512
- }
513
- );
514
- }
515
- function FocusIndicator({
516
- point = null,
517
- pulseKey = 0
518
- }) {
519
- if (!point) return null;
520
- return /* @__PURE__ */ jsx(FocusPulse, { point }, pulseKey);
521
- }
522
- function FocusTapZone({ onFocusPoint }) {
523
- const { styles } = useStyles(overlaySheet);
524
- const size = React3.useRef({ width: 0, height: 0 });
525
- const onLayout = (e) => {
526
- size.current = {
527
- width: e.nativeEvent.layout.width,
528
- height: e.nativeEvent.layout.height
529
- };
530
- };
531
- return /* @__PURE__ */ jsx(
532
- Pressable,
533
- {
534
- accessible: false,
535
- importantForAccessibility: "no-hide-descendants",
536
- testID: "loam-focus-zone",
537
- ...decorativeProps(),
538
- ...untabbableProps(),
539
- onLayout,
540
- style: styles.tapZone,
541
- onPress: (e) => {
542
- if (!onFocusPoint) return;
543
- const { width, height } = size.current;
544
- if (width === 0 || height === 0) return;
545
- const { locationX, locationY } = e.nativeEvent;
546
- onFocusPoint({
547
- x: Math.min(1, Math.max(0, locationX / width)),
548
- y: Math.min(1, Math.max(0, locationY / height))
549
- });
550
- }
551
- }
552
- );
553
- }
554
- var overlaySheet = createStyleSheet((theme) => ({
555
- scanBand: {
556
- width: "100%",
557
- overflow: "hidden",
558
- // In the style object, not as a prop: the prop form is deprecated in
559
- // react-native-web and warns on every render.
560
- pointerEvents: "none"
561
- },
562
- scanLine: {
563
- position: "absolute",
564
- left: theme.space[0],
565
- right: theme.space[0],
566
- top: theme.space[0]
567
- },
568
- guideRoot: {
569
- pointerEvents: "none",
570
- position: "absolute",
571
- top: theme.space[0],
572
- bottom: theme.space[0],
573
- left: theme.space[0],
574
- right: theme.space[0],
575
- flexDirection: "column",
576
- variants: {
577
- // The guide has done its job once a tracker locks; the boxes are the
578
- // thing to look at (spec E.4).
579
- dimmed: { true: { opacity: theme.opacity[20] }, false: {} },
580
- pass: { true: {}, false: {} }
581
- }
582
- },
583
- scrimBand: {
584
- flexGrow: 1,
585
- flexShrink: 1,
586
- flexBasis: theme.space[0]
587
- },
588
- // The row's own bands. `alignSelf: 'stretch'` is the load-bearing line: the
589
- // row centres its children, and a band with no content and no stretch is
590
- // zero points tall — which left the circle's "hole" a full-width strip.
591
- scrimSide: {
592
- flexGrow: 1,
593
- flexShrink: 1,
594
- flexBasis: theme.space[0],
595
- alignSelf: "stretch"
596
- },
597
- holeRing: {
598
- position: "absolute"
599
- },
600
- guideRootBleed: {
601
- top: "-100%",
602
- bottom: "-100%"
603
- },
604
- guideRow: {
605
- flexDirection: "row",
606
- alignItems: "center",
607
- justifyContent: "center"
608
- },
609
- guideBox: {
610
- alignItems: "center",
611
- justifyContent: "center"
612
- },
613
- guideStretch: {
614
- alignSelf: "stretch"
615
- },
616
- guideSquare: {
617
- aspectRatio: 1
618
- },
619
- circleGuide: {
620
- width: "100%",
621
- height: "100%",
622
- borderRadius: theme.radius.full,
623
- borderWidth: theme.borderWidth.strong
624
- },
625
- lineGuide: {
626
- width: "100%",
627
- borderRadius: theme.radius.sm,
628
- borderWidth: theme.borderWidth.strong,
629
- overflow: "hidden"
630
- },
631
- hintWrap: {
632
- position: "absolute",
633
- bottom: "100%",
634
- marginBottom: theme.space[8],
635
- alignItems: "center"
636
- },
637
- // An instruction, so the sans face at full ink — mono with wide tracking is
638
- // the metadata treatment (the feed label), and it read as a caption here.
639
- hint: {
640
- fontFamily: theme.font.sans,
641
- fontSize: theme.fontSize[12],
642
- color: theme.media.ink,
643
- paddingHorizontal: theme.space[12],
644
- paddingVertical: theme.space[4],
645
- borderRadius: theme.radius.full,
646
- backgroundColor: theme.black.a12,
647
- borderWidth: theme.borderWidth.base,
648
- borderColor: theme.white.a5,
649
- overflow: "hidden"
650
- },
651
- cornerTopStart: {
652
- position: "absolute",
653
- top: theme.space[0],
654
- left: theme.space[0],
655
- width: theme.space[32],
656
- height: theme.space[32],
657
- borderTopWidth: theme.borderWidth.strong,
658
- borderLeftWidth: theme.borderWidth.strong,
659
- borderTopLeftRadius: theme.radius.sm
660
- },
661
- cornerTopEnd: {
662
- position: "absolute",
663
- top: theme.space[0],
664
- right: theme.space[0],
665
- width: theme.space[32],
666
- height: theme.space[32],
667
- borderTopWidth: theme.borderWidth.strong,
668
- borderRightWidth: theme.borderWidth.strong,
669
- borderTopRightRadius: theme.radius.sm
670
- },
671
- cornerBottomStart: {
672
- position: "absolute",
673
- bottom: theme.space[0],
674
- left: theme.space[0],
675
- width: theme.space[32],
676
- height: theme.space[32],
677
- borderBottomWidth: theme.borderWidth.strong,
678
- borderLeftWidth: theme.borderWidth.strong,
679
- borderBottomLeftRadius: theme.radius.sm
680
- },
681
- cornerBottomEnd: {
682
- position: "absolute",
683
- bottom: theme.space[0],
684
- right: theme.space[0],
685
- width: theme.space[32],
686
- height: theme.space[32],
687
- borderBottomWidth: theme.borderWidth.strong,
688
- borderRightWidth: theme.borderWidth.strong,
689
- borderBottomRightRadius: theme.radius.sm
690
- },
691
- gridRoot: {
692
- pointerEvents: "none",
693
- position: "absolute",
694
- top: theme.space[0],
695
- bottom: theme.space[0],
696
- left: theme.space[0],
697
- right: theme.space[0]
698
- },
699
- gridV1: {
700
- position: "absolute",
701
- top: theme.space[0],
702
- bottom: theme.space[0],
703
- left: "33.333%",
704
- width: theme.borderWidth.hair,
705
- backgroundColor: theme.white.a5
706
- },
707
- gridV2: {
708
- position: "absolute",
709
- top: theme.space[0],
710
- bottom: theme.space[0],
711
- left: "66.666%",
712
- width: theme.borderWidth.hair,
713
- backgroundColor: theme.white.a5
714
- },
715
- gridH1: {
716
- position: "absolute",
717
- left: theme.space[0],
718
- right: theme.space[0],
719
- top: "33.333%",
720
- height: theme.borderWidth.hair,
721
- backgroundColor: theme.white.a5
722
- },
723
- gridH2: {
724
- position: "absolute",
725
- left: theme.space[0],
726
- right: theme.space[0],
727
- top: "66.666%",
728
- height: theme.borderWidth.hair,
729
- backgroundColor: theme.white.a5
730
- },
731
- focusBox: {
732
- pointerEvents: "none",
733
- position: "absolute",
734
- width: theme.space[72],
735
- height: theme.space[72],
736
- marginLeft: -theme.space[36],
737
- marginTop: -theme.space[36],
738
- alignItems: "center",
739
- justifyContent: "center",
740
- borderRadius: theme.radius.sm,
741
- borderWidth: theme.borderWidth.strong
742
- },
743
- tapZone: {
744
- position: "absolute",
745
- top: theme.space[0],
746
- bottom: theme.space[0],
747
- left: theme.space[0],
748
- right: theme.space[0]
749
- }
750
- }));
751
- var AnimatedPath = Animated.createAnimatedComponent(Path);
752
- var SEVERITY_DASH = {
753
- none: "dotted",
754
- minor: "dashed",
755
- moderate: "solid"
756
- };
757
- function toneStroke(theme, tone) {
758
- switch (tone) {
759
- case "good":
760
- return theme.color.good;
761
- case "warn":
762
- return theme.color.warn;
763
- case "danger":
764
- return theme.color.danger;
765
- default:
766
- return theme.white.a12;
767
- }
768
- }
769
- function TrackChip({
770
- label,
771
- conf,
772
- slot = "above",
773
- anchor = "start",
774
- room = 100,
775
- staggerIndex = 0,
776
- frozen = false
777
- }) {
778
- const theme = useLoamTheme();
779
- const reduced = useReducedMotion();
780
- const tone = confidenceTone(conf);
781
- const { styles } = useStyles(trackingSheet, { slot, tone, anchor });
782
- const still = reduced || theme.reduceMotion || frozen;
783
- const enter = React3.useRef(new Animated.Value(still ? 1 : 0)).current;
784
- const delay = React3.useRef(staggerIndex * TRACKING_MOTION.chipStagger).current;
785
- React3.useEffect(() => {
786
- if (still) {
787
- enter.setValue(1);
788
- return;
789
- }
790
- const anim = Animated.timing(enter, {
791
- toValue: 1,
792
- delay,
793
- duration: theme.motion.enter.duration,
794
- easing: Easing.bezier(...theme.motion.enter.easing),
795
- useNativeDriver: true
796
- });
797
- anim.start();
798
- return () => anim.stop();
799
- }, [still, enter, delay, theme.motion.enter.duration, theme.motion.enter.easing]);
800
- return /* @__PURE__ */ jsx(View, { style: [styles.chipLane, { width: `${room}%` }], ...decorativeProps(), children: /* @__PURE__ */ jsxs(
801
- Animated.View,
802
- {
803
- accessible: false,
804
- testID: `loam-track-chip-${slot}`,
805
- style: [styles.chip, { opacity: enter }],
806
- children: [
807
- /* @__PURE__ */ jsx(View, { style: styles.chipDot }),
808
- /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles.chipLabel, children: label }),
809
- /* @__PURE__ */ jsx(Text, { style: styles.chipConf, children: confidenceLabel(conf) })
810
- ]
811
- }
812
- ) });
813
- }
814
- function TrackCountPill({ count, label }) {
815
- const { styles } = useStyles(trackingSheet);
816
- if (count <= 0) return null;
817
- return /* @__PURE__ */ jsx(View, { accessible: false, testID: "loam-track-count", style: styles.countPill, ...decorativeProps(), children: /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles.countText, children: label ?? trackCountLabel(count) }) });
818
- }
819
- var OUTLINE_PATH = {
820
- /** A leafy blob — the plant profile's subject. */
821
- 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",
822
- /** A car in three-quarter view — the panel profile's subject. */
823
- 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"
824
- };
825
- function pct(v) {
826
- return v.interpolate({ inputRange: [0, 100], outputRange: ["0%", "100%"] });
827
- }
828
- function TrackedBox({
829
- object,
830
- locked,
831
- tone,
832
- chip = true,
833
- chipIndex = 0,
834
- ease = TRACKING_MOTION.ease,
835
- frozen = false
836
- }) {
837
- const theme = useLoamTheme();
838
- const reduced = useReducedMotion();
839
- const [x, y, w, h] = object.box;
840
- const isLocked = locked ?? object.locked ?? false;
841
- const severity = object.severity;
842
- const resolved = tone ?? trackTone({ ...object, locked: isLocked });
843
- const dash = severity ? SEVERITY_DASH[severity] : "solid";
844
- const { styles } = useStyles(trackingSheet, { dash });
845
- const stroke = toneStroke(theme, resolved);
846
- const still = reduced || theme.reduceMotion || frozen;
847
- const geo = React3.useRef({
848
- x: new Animated.Value(x),
849
- y: new Animated.Value(y),
850
- w: new Animated.Value(w),
851
- h: new Animated.Value(h)
852
- }).current;
853
- const lock = React3.useRef(new Animated.Value(1)).current;
854
- const ants = React3.useRef(new Animated.Value(0)).current;
855
- const last = React3.useRef(object.box);
856
- React3.useEffect(() => {
857
- const to = { x, y, w, h };
858
- const keys = ["x", "y", "w", "h"];
859
- const [px, py, pw, ph] = last.current;
860
- const moved = px !== x || py !== y || pw !== w || ph !== h;
861
- last.current = [x, y, w, h];
862
- if (still) {
863
- for (const k of keys) geo[k].setValue(to[k]);
864
- return;
865
- }
866
- if (!moved) return;
867
- const anim = Animated.parallel(
868
- keys.map(
869
- (k) => Animated.timing(geo[k], {
870
- toValue: to[k],
871
- duration: ease,
872
- easing: Easing.bezier(...theme.easing.out),
873
- useNativeDriver: false
874
- })
875
- )
876
- );
877
- anim.start();
878
- return () => anim.stop();
879
- }, [x, y, w, h, still, ease, geo, last, theme.easing.out]);
880
- React3.useEffect(() => {
881
- if (!isLocked || still) {
882
- lock.setValue(1);
883
- return;
884
- }
885
- lock.setValue(0);
886
- const anim = Animated.timing(lock, {
887
- toValue: 1,
888
- duration: TRACKING_MOTION.lock,
889
- easing: Easing.bezier(...theme.easing.out),
890
- useNativeDriver: true
891
- });
892
- anim.start();
893
- return () => anim.stop();
894
- }, [isLocked, still, lock, theme.easing.out]);
895
- React3.useEffect(() => {
896
- if (!object.outline || still) {
897
- ants.setValue(0);
898
- return;
899
- }
900
- const loop = Animated.loop(
901
- Animated.timing(ants, {
902
- toValue: 1,
903
- duration: TRACKING_MOTION.ants,
904
- easing: Easing.linear,
905
- useNativeDriver: false
906
- })
907
- );
908
- loop.start();
909
- return () => loop.stop();
910
- }, [object.outline, still, ants]);
911
- const dashUnit = theme.space[4];
912
- const lockScale = lock.interpolate({
913
- inputRange: [0, 1],
914
- outputRange: [TRACKING_MOTION.lockScale, 1]
915
- });
916
- return /* @__PURE__ */ jsxs(
917
- Animated.View,
918
- {
919
- accessible: false,
920
- testID: `loam-track-box-${object.id}`,
921
- style: [styles.box, { left: pct(geo.x), top: pct(geo.y), width: pct(geo.w), height: pct(geo.h) }],
922
- ...decorativeProps(),
923
- children: [
924
- /* @__PURE__ */ jsxs(Animated.View, { style: [styles.bracketLayer, { transform: [{ scale: lockScale }] }], children: [
925
- /* @__PURE__ */ jsx(View, { style: [styles.armTopStart, { borderColor: stroke }] }),
926
- /* @__PURE__ */ jsx(View, { style: [styles.armTopEnd, { borderColor: stroke }] }),
927
- /* @__PURE__ */ jsx(View, { style: [styles.armBottomStart, { borderColor: stroke }] }),
928
- /* @__PURE__ */ jsx(View, { style: [styles.armBottomEnd, { borderColor: stroke }] })
929
- ] }),
930
- object.outline ? (
931
- // A wrapping `View`, not `style` on the `Svg`: the outline has to be an
932
- // absolutely positioned layer over the box, and a `View` is the thing
933
- // this library positions.
934
- /* @__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(
935
- AnimatedPath,
936
- {
937
- d: OUTLINE_PATH[object.outline],
938
- stroke,
939
- strokeWidth: 1,
940
- strokeLinejoin: "round",
941
- vectorEffect: "non-scaling-stroke",
942
- fill: "none",
943
- strokeDasharray: [dashUnit, dashUnit],
944
- strokeDashoffset: ants.interpolate({
945
- inputRange: [0, 1],
946
- outputRange: [0, theme.space[8]]
947
- })
948
- }
949
- ) }) })
950
- ) : null,
951
- isLocked ? (
952
- // The lock's non-colour channel. Inside the box's trailing-top corner,
953
- // where it cannot collide with a chip in any of the three slots.
954
- /* @__PURE__ */ jsx(View, { testID: "loam-track-lock", style: styles.lockGlyph, children: /* @__PURE__ */ jsx(Icon, { name: "lock", size: theme.icon.xs, color: stroke }) })
955
- ) : null,
956
- chip ? /* @__PURE__ */ jsx(
957
- TrackChip,
958
- {
959
- label: object.label,
960
- conf: object.conf,
961
- slot: chipSlot(object.box),
962
- anchor: chipAnchor(object.box),
963
- room: chipRoom(object.box),
964
- staggerIndex: chipIndex,
965
- frozen
966
- }
967
- ) : null
968
- ]
969
- }
970
- );
971
- }
972
- function TrackingOverlay({
973
- objects = [],
974
- maxChips = MAX_CHIPS,
975
- ease = TRACKING_MOTION.ease,
976
- frozen = false,
977
- dimmed = false,
978
- safeAreaBottom = 0,
979
- label
980
- }) {
981
- const { styles } = useStyles(trackingSheet, { dimmed });
982
- const [framePx, setFramePx] = React3.useState(0);
983
- const { chips, overflow } = visibleChips([...objects], maxChips, framePx || void 0);
984
- const chipIndex = new Map(chips.map((o, i) => [o.id, i]));
985
- const name = label === void 0 ? trackingSummaryLabel(objects) : label;
986
- return /* @__PURE__ */ jsxs(
987
- View,
988
- {
989
- testID: "loam-tracking-overlay",
990
- accessible: name !== null,
991
- accessibilityRole: name === null ? void 0 : "image",
992
- accessibilityLabel: name ?? void 0,
993
- style: styles.overlayRoot,
994
- onLayout: (e) => setFramePx(e.nativeEvent.layout.width),
995
- ...name === null ? decorativeProps() : {},
996
- children: [
997
- objects.map((o) => /* @__PURE__ */ jsx(
998
- TrackedBox,
999
- {
1000
- object: o,
1001
- chip: chipIndex.has(o.id),
1002
- chipIndex: chipIndex.get(o.id) ?? 0,
1003
- ease,
1004
- frozen
1005
- },
1006
- o.id
1007
- )),
1008
- overflow > 0 ? /* @__PURE__ */ jsx(View, { style: [styles.countRow, { marginTop: -safeAreaBottom }], children: /* @__PURE__ */ jsx(TrackCountPill, { count: objects.length }) }) : null
1009
- ]
1010
- }
1011
- );
1012
- }
1013
- var trackingSheet = createStyleSheet((theme) => ({
1014
- overlayRoot: {
1015
- pointerEvents: "none",
1016
- position: "absolute",
1017
- top: theme.space[0],
1018
- bottom: theme.space[0],
1019
- left: theme.space[0],
1020
- right: theme.space[0],
1021
- variants: {
1022
- // `analysing` fades the layer back; every state inside keeps its own
1023
- // channels, so the opacity is carrying nothing but distance.
1024
- dimmed: { true: { opacity: theme.opacity[48] }, false: {} }
1025
- }
1026
- },
1027
- box: {
1028
- pointerEvents: "none",
1029
- position: "absolute"
1030
- },
1031
- bracketLayer: {
1032
- position: "absolute",
1033
- top: theme.space[0],
1034
- bottom: theme.space[0],
1035
- left: theme.space[0],
1036
- right: theme.space[0]
1037
- },
1038
- outline: {
1039
- position: "absolute",
1040
- top: theme.space[0],
1041
- bottom: theme.space[0],
1042
- left: theme.space[0],
1043
- right: theme.space[0]
1044
- },
1045
- // Arm length is a share of the box, so a 6% box gets small brackets and a
1046
- // 60% box gets large ones rather than every box getting 32pt.
1047
- armTopStart: {
1048
- position: "absolute",
1049
- top: theme.space[0],
1050
- left: theme.space[0],
1051
- width: "25%",
1052
- height: "25%",
1053
- maxWidth: theme.space[32],
1054
- maxHeight: theme.space[32],
1055
- borderTopWidth: theme.borderWidth.strong,
1056
- borderLeftWidth: theme.borderWidth.strong,
1057
- borderTopLeftRadius: theme.radius.xs,
1058
- variants: {
1059
- dash: {
1060
- dotted: { borderStyle: "dotted" },
1061
- dashed: { borderStyle: "dashed" },
1062
- solid: { borderStyle: "solid" }
1063
- }
1064
- }
1065
- },
1066
- armTopEnd: {
1067
- position: "absolute",
1068
- top: theme.space[0],
1069
- right: theme.space[0],
1070
- width: "25%",
1071
- height: "25%",
1072
- maxWidth: theme.space[32],
1073
- maxHeight: theme.space[32],
1074
- borderTopWidth: theme.borderWidth.strong,
1075
- borderRightWidth: theme.borderWidth.strong,
1076
- borderTopRightRadius: theme.radius.xs,
1077
- variants: {
1078
- dash: {
1079
- dotted: { borderStyle: "dotted" },
1080
- dashed: { borderStyle: "dashed" },
1081
- solid: { borderStyle: "solid" }
1082
- }
1083
- }
1084
- },
1085
- armBottomStart: {
1086
- position: "absolute",
1087
- bottom: theme.space[0],
1088
- left: theme.space[0],
1089
- width: "25%",
1090
- height: "25%",
1091
- maxWidth: theme.space[32],
1092
- maxHeight: theme.space[32],
1093
- borderBottomWidth: theme.borderWidth.strong,
1094
- borderLeftWidth: theme.borderWidth.strong,
1095
- borderBottomLeftRadius: theme.radius.xs,
1096
- variants: {
1097
- dash: {
1098
- dotted: { borderStyle: "dotted" },
1099
- dashed: { borderStyle: "dashed" },
1100
- solid: { borderStyle: "solid" }
1101
- }
1102
- }
1103
- },
1104
- armBottomEnd: {
1105
- position: "absolute",
1106
- bottom: theme.space[0],
1107
- right: theme.space[0],
1108
- width: "25%",
1109
- height: "25%",
1110
- maxWidth: theme.space[32],
1111
- maxHeight: theme.space[32],
1112
- borderBottomWidth: theme.borderWidth.strong,
1113
- borderRightWidth: theme.borderWidth.strong,
1114
- borderBottomRightRadius: theme.radius.xs,
1115
- variants: {
1116
- dash: {
1117
- dotted: { borderStyle: "dotted" },
1118
- dashed: { borderStyle: "dashed" },
1119
- solid: { borderStyle: "solid" }
1120
- }
1121
- }
1122
- },
1123
- lockGlyph: {
1124
- position: "absolute",
1125
- top: theme.space[0],
1126
- right: theme.space[0],
1127
- margin: theme.space[2]
1128
- },
1129
- // The lane the chip hugs its content in. An absolute box shrink-wraps to its
1130
- // containing block, so a chip positioned straight on a 60px wheel box was
1131
- // capped at 60px: the label collapsed to nothing and the percentage spilled
1132
- // past the plate. The lane anchors at the edge `chipAnchor()` picks and is as
1133
- // wide as `chipRoom()` — up to the frame edge, never past a menu's width — and
1134
- // the chip sizes to its own label inside it.
1135
- chipLane: {
1136
- pointerEvents: "none",
1137
- position: "absolute",
1138
- maxWidth: theme.panel.xs,
1139
- flexDirection: "row",
1140
- variants: {
1141
- anchor: {
1142
- start: { left: theme.space[0], justifyContent: "flex-start" },
1143
- end: { right: theme.space[0], justifyContent: "flex-end" }
1144
- },
1145
- slot: {
1146
- above: { bottom: "100%", marginBottom: theme.space[4] },
1147
- "inside-top": { top: theme.space[0], marginTop: theme.space[4] },
1148
- below: { top: "100%", marginTop: theme.space[4] }
1149
- }
1150
- }
1151
- },
1152
- chip: {
1153
- flexShrink: 1,
1154
- flexDirection: "row",
1155
- alignItems: "center",
1156
- gap: theme.space[6],
1157
- paddingHorizontal: theme.space[8],
1158
- paddingVertical: theme.space[2],
1159
- borderRadius: theme.radius.full,
1160
- // The same plate `viewfinder-chrome.tsx` defines, written out rather than
1161
- // spread from `camGlass()`: a spread of a function's return type collapses
1162
- // Unistyles' variant inference for the whole sheet, and the `slot` and
1163
- // `tone` variants below are what place and colour this chip.
1164
- backgroundColor: theme.black.a12,
1165
- borderWidth: theme.borderWidth.base,
1166
- borderColor: theme.white.a5,
1167
- variants: {
1168
- tone: { good: {}, warn: {}, danger: {} }
1169
- }
1170
- },
1171
- chipDot: {
1172
- width: theme.space[6],
1173
- height: theme.space[6],
1174
- flexGrow: 0,
1175
- flexShrink: 0,
1176
- borderRadius: theme.radius.full,
1177
- variants: {
1178
- tone: {
1179
- good: { backgroundColor: theme.color.good },
1180
- warn: { backgroundColor: theme.color.warn },
1181
- danger: { backgroundColor: theme.color.danger }
1182
- },
1183
- slot: { above: {}, "inside-top": {}, below: {} }
1184
- }
1185
- },
1186
- chipLabel: {
1187
- fontFamily: theme.font.sans,
1188
- fontSize: theme.fontSize[11],
1189
- color: camInk(theme),
1190
- flexShrink: 1
1191
- },
1192
- chipConf: {
1193
- fontFamily: theme.font.mono,
1194
- fontSize: theme.fontSize[11],
1195
- color: camInk(theme),
1196
- flexGrow: 0,
1197
- flexShrink: 0,
1198
- fontVariant: ["tabular-nums"]
1199
- },
1200
- countRow: {
1201
- position: "absolute",
1202
- top: `${TRACK_BAND_BOTTOM}%`,
1203
- left: theme.space[0],
1204
- right: theme.space[0],
1205
- alignItems: "center"
1206
- },
1207
- countPill: {
1208
- flexDirection: "row",
1209
- alignItems: "center",
1210
- paddingHorizontal: theme.space[12],
1211
- paddingVertical: theme.space[4],
1212
- borderRadius: theme.radius.full,
1213
- backgroundColor: theme.black.a12,
1214
- borderWidth: theme.borderWidth.base,
1215
- borderColor: theme.white.a5
1216
- },
1217
- countText: {
1218
- fontFamily: theme.font.mono,
1219
- fontSize: theme.fontSize[11],
1220
- color: camInk(theme),
1221
- fontVariant: ["tabular-nums"]
1222
- }
1223
- }));
1224
- function SequenceStrip({
1225
- total = 6,
1226
- shots = 0,
1227
- current = 0,
1228
- angles,
1229
- mode = "angles",
1230
- readLabel,
1231
- onRedo,
1232
- onRead
1233
- }) {
1234
- const theme = useLoamTheme();
1235
- const { styles } = useStyles(sequenceSheet);
1236
- const batch = mode === "batch";
1237
- const count = batch ? Math.max(3, shots + 1) : total;
1238
- const cells = Array.from({ length: count }, (_, i) => i);
1239
- return /* @__PURE__ */ jsxs(View, { role: "group", accessibilityLabel: batch ? "Captured pages" : "Capture sequence", style: styles.strip, children: [
1240
- /* @__PURE__ */ jsx(
1241
- ScrollView,
1242
- {
1243
- horizontal: true,
1244
- showsHorizontalScrollIndicator: false,
1245
- contentContainerStyle: styles.railContent,
1246
- style: styles.rail,
1247
- children: cells.map((i) => {
1248
- const done = i < shots;
1249
- const isCurrent = !done && i === current;
1250
- const name = batch ? `Page ${i + 1}` : angles?.[i]?.label ?? `Angle ${i + 1}`;
1251
- const label = done ? `${name} \u2014 captured, tap to redo` : name;
1252
- if (done) {
1253
- return /* @__PURE__ */ jsx(
1254
- Pressable,
1255
- {
1256
- accessibilityRole: "button",
1257
- accessibilityLabel: label,
1258
- style: styles.cellDone,
1259
- hitSlop: (theme.hit.lg - theme.space[32]) / 2,
1260
- onPress: () => onRedo?.(i),
1261
- children: /* @__PURE__ */ jsx(
1262
- Icon,
1263
- {
1264
- name: "check",
1265
- size: theme.icon.sm,
1266
- color: theme.color.goodInk,
1267
- strokeWidth: theme.icon.strokeBold
1268
- }
1269
- )
1270
- },
1271
- i
1272
- );
1273
- }
1274
- return /* @__PURE__ */ jsx(
1275
- View,
1276
- {
1277
- accessible: true,
1278
- accessibilityLabel: label,
1279
- style: [styles.cellPending, isCurrent ? styles.cellCurrent : null],
1280
- children: /* @__PURE__ */ jsx(Text, { style: styles.cellNumber, accessible: false, children: String(i + 1) })
1281
- },
1282
- i
1283
- );
1284
- })
1285
- }
1286
- ),
1287
- batch && shots > 0 ? (
1288
- // Pinned: outside the scroller, so eleven pages cannot push it off the
1289
- // end of the rail.
1290
- /* @__PURE__ */ jsx(
1291
- Pressable,
1292
- {
1293
- accessibilityRole: "button",
1294
- style: styles.pinned,
1295
- hitSlop: (theme.hit.lg - theme.space[32]) / 2,
1296
- onPress: onRead,
1297
- children: /* @__PURE__ */ jsx(Text, { style: styles.pinnedLabel, children: readLabel ?? readBatchLabel(shots) })
1298
- }
1299
- )
1300
- ) : null
1301
- ] });
1302
- }
1303
- var EV_STOPS = Array.from(
1304
- { length: 13 },
1305
- (_, i) => Math.round((i - 6) / 3 * 100) / 100
1306
- );
1307
- function evLabel(v) {
1308
- if (v === 0) return "0";
1309
- return `${v > 0 ? "+" : ""}${v.toFixed(1)}`;
1310
- }
1311
- var GROUP = {
1312
- ev: EXPERT[1]?.[0] ?? "EV compensation",
1313
- torch: EXPERT[3]?.[0] ?? "Torch level",
1314
- format: EXPERT[4]?.[0] ?? "Resolution and format",
1315
- ae: EXPERT[0]?.[0] ?? "Exposure lock",
1316
- af: EXPERT[2]?.[0] ?? "Focus lock",
1317
- gridLevel: EXPERT[5]?.[0] ?? "Grid and level"
1318
- };
1319
- function Stop2({
1320
- on,
1321
- label,
1322
- onPick
1323
- }) {
1324
- const theme = useLoamTheme();
1325
- const { styles } = useStyles(sequenceSheet, { on });
1326
- return /* @__PURE__ */ jsx(
1327
- Pressable,
1328
- {
1329
- accessibilityRole: "button",
1330
- accessibilityLabel: label,
1331
- accessibilityState: { selected: on },
1332
- style: styles.stop,
1333
- onPress: onPick,
1334
- ...pressedProps(on),
1335
- children: /* @__PURE__ */ jsx(Text, { style: [styles.stopLabel, { color: on ? theme.media.onInk : camInk(theme) }], children: label })
1336
- }
1337
- );
1338
- }
1339
- function ExpertPanel({
1340
- platform = "ios",
1341
- values = {},
1342
- onChange,
1343
- onClose
1344
- }) {
1345
- const theme = useLoamTheme();
1346
- const { styles } = useStyles(sequenceSheet);
1347
- const {
1348
- ev = 0,
1349
- torch = "off",
1350
- format = "pipeline",
1351
- aeLock = false,
1352
- afLock = false,
1353
- level = false,
1354
- grid = false
1355
- } = values;
1356
- const toggles = [
1357
- [GROUP.ae, aeLock, "aeLock"],
1358
- [GROUP.af, afLock, "afLock"],
1359
- ["Level", level, "level"],
1360
- ["Grid", grid, "grid"]
1361
- ];
1362
- return /* @__PURE__ */ jsxs(View, { role: "group", accessibilityLabel: "Expert controls", style: styles.panel, children: [
1363
- /* @__PURE__ */ jsxs(View, { style: styles.panelHead, children: [
1364
- /* @__PURE__ */ jsx(Text, { style: [styles.panelTitle, { color: camInk(theme) }], children: "Expert" }),
1365
- /* @__PURE__ */ jsx(View, { style: styles.panelHeadEnd, children: onClose ? /* @__PURE__ */ jsx(GlassIconButton, { icon: "x", label: "Close expert controls", onPress: onClose }) : null })
1366
- ] }),
1367
- /* @__PURE__ */ jsxs(View, { role: "group", accessibilityLabel: GROUP.ev, style: styles.group, children: [
1368
- /* @__PURE__ */ jsx(Text, { style: [styles.groupLabel, camMeta(theme)], children: GROUP.ev.toUpperCase() }),
1369
- /* @__PURE__ */ jsx(
1370
- ScrollView,
1371
- {
1372
- horizontal: true,
1373
- showsHorizontalScrollIndicator: false,
1374
- contentContainerStyle: styles.stopRow,
1375
- children: EV_STOPS.map((stop) => /* @__PURE__ */ jsx(
1376
- Stop2,
1377
- {
1378
- on: stop === ev,
1379
- label: evLabel(stop),
1380
- onPick: () => onChange?.({ control: "ev", value: stop })
1381
- },
1382
- stop
1383
- ))
1384
- }
1385
- )
1386
- ] }),
1387
- /* @__PURE__ */ jsxs(View, { role: "group", accessibilityLabel: GROUP.torch, style: styles.group, children: [
1388
- /* @__PURE__ */ jsx(Text, { style: [styles.groupLabel, camMeta(theme)], children: GROUP.torch.toUpperCase() }),
1389
- /* @__PURE__ */ jsx(View, { style: styles.stopRow, children: ["off", "low", "high"].map((lvl) => /* @__PURE__ */ jsx(
1390
- Stop2,
1391
- {
1392
- on: lvl === torch,
1393
- label: lvl,
1394
- onPick: () => onChange?.({ control: "torch", value: lvl })
1395
- },
1396
- lvl
1397
- )) })
1398
- ] }),
1399
- /* @__PURE__ */ jsxs(View, { role: "group", accessibilityLabel: GROUP.format, style: styles.group, children: [
1400
- /* @__PURE__ */ jsx(Text, { style: [styles.groupLabel, camMeta(theme)], children: GROUP.format.toUpperCase() }),
1401
- /* @__PURE__ */ jsx(View, { style: styles.stopRow, children: ["pipeline", "full"].map((f) => /* @__PURE__ */ jsx(
1402
- Stop2,
1403
- {
1404
- on: f === format,
1405
- label: f === "pipeline" ? "Pipeline-native" : "Full sensor",
1406
- onPick: () => onChange?.({ control: "format", value: f })
1407
- },
1408
- f
1409
- )) })
1410
- ] }),
1411
- /* @__PURE__ */ jsx(
1412
- View,
1413
- {
1414
- role: "group",
1415
- accessibilityLabel: GROUP.gridLevel,
1416
- style: styles.toggleRow,
1417
- testID: `loam-expert-${platform}`,
1418
- children: toggles.map(([label, on, control]) => /* @__PURE__ */ jsx(
1419
- Stop2,
1420
- {
1421
- on,
1422
- label,
1423
- onPick: () => onChange?.({ control, value: !on })
1424
- },
1425
- control
1426
- ))
1427
- }
1428
- )
1429
- ] });
1430
- }
1431
- var sequenceSheet = createStyleSheet((theme) => ({
1432
- strip: {
1433
- flexDirection: "row",
1434
- alignItems: "center",
1435
- gap: theme.space[8]
1436
- },
1437
- rail: {
1438
- flexGrow: 1,
1439
- flexShrink: 1,
1440
- flexBasis: theme.space[0]
1441
- },
1442
- railContent: {
1443
- flexDirection: "row",
1444
- alignItems: "center",
1445
- gap: theme.space[6]
1446
- },
1447
- cellDone: {
1448
- width: theme.space[32],
1449
- height: theme.space[32],
1450
- flexGrow: 0,
1451
- flexShrink: 0,
1452
- alignItems: "center",
1453
- justifyContent: "center",
1454
- borderRadius: theme.radius.sm,
1455
- backgroundColor: theme.color.good,
1456
- borderWidth: theme.borderWidth.base,
1457
- borderColor: theme.white.a5
1458
- },
1459
- cellPending: {
1460
- width: theme.space[32],
1461
- height: theme.space[32],
1462
- flexGrow: 0,
1463
- flexShrink: 0,
1464
- alignItems: "center",
1465
- justifyContent: "center",
1466
- borderRadius: theme.radius.sm,
1467
- backgroundColor: theme.black.a12,
1468
- borderWidth: theme.borderWidth.base,
1469
- borderColor: theme.white.a5
1470
- },
1471
- cellCurrent: {
1472
- borderWidth: theme.borderWidth.strong,
1473
- borderColor: theme.media.ink
1474
- },
1475
- cellNumber: {
1476
- fontFamily: theme.font.sans,
1477
- fontSize: theme.fontSize[11],
1478
- fontVariant: ["tabular-nums"],
1479
- color: theme.media.ink
1480
- },
1481
- pinned: {
1482
- flexGrow: 0,
1483
- flexShrink: 0,
1484
- height: theme.space[32],
1485
- alignItems: "center",
1486
- justifyContent: "center",
1487
- paddingHorizontal: theme.space[12],
1488
- borderRadius: theme.radius.sm,
1489
- backgroundColor: theme.media.ink
1490
- },
1491
- pinnedLabel: {
1492
- fontFamily: theme.font.sans,
1493
- fontSize: theme.fontSize[12],
1494
- fontWeight: theme.fontWeight.medium,
1495
- color: theme.media.onInk
1496
- },
1497
- panel: {
1498
- flexDirection: "column",
1499
- gap: theme.space[16],
1500
- padding: theme.space[16],
1501
- borderRadius: theme.radius.md,
1502
- backgroundColor: theme.black.a12,
1503
- borderWidth: theme.borderWidth.base,
1504
- borderColor: theme.white.a5
1505
- },
1506
- panelHead: {
1507
- flexDirection: "row",
1508
- alignItems: "center",
1509
- gap: theme.space[12]
1510
- },
1511
- panelHeadEnd: {
1512
- marginStart: "auto"
1513
- },
1514
- panelTitle: {
1515
- fontFamily: theme.font.sans,
1516
- fontSize: theme.fontSize[13]
1517
- },
1518
- group: {
1519
- flexDirection: "column",
1520
- gap: theme.space[8]
1521
- },
1522
- groupLabel: {
1523
- fontSize: theme.fontSize[10]
1524
- },
1525
- stopRow: {
1526
- flexDirection: "row",
1527
- alignItems: "center",
1528
- gap: theme.space[8]
1529
- },
1530
- toggleRow: {
1531
- flexDirection: "row",
1532
- flexWrap: "wrap",
1533
- alignItems: "center",
1534
- gap: theme.space[8]
1535
- },
1536
- stop: {
1537
- height: theme.ctl.lg,
1538
- minWidth: theme.ctl.lg,
1539
- flexGrow: 0,
1540
- flexShrink: 0,
1541
- alignItems: "center",
1542
- justifyContent: "center",
1543
- paddingHorizontal: theme.space[12],
1544
- borderRadius: theme.radius.sm,
1545
- borderWidth: theme.borderWidth.base,
1546
- borderColor: theme.white.a5,
1547
- variants: {
1548
- on: {
1549
- true: { backgroundColor: theme.media.ink, borderColor: theme.media.ink },
1550
- false: { backgroundColor: theme.black.a12 }
1551
- }
1552
- }
1553
- },
1554
- stopLabel: {
1555
- fontFamily: theme.font.sans,
1556
- fontSize: theme.fontSize[11],
1557
- fontVariant: ["tabular-nums"]
1558
- }
1559
- }));
1560
- function ShutterTray({
1561
- platform = "ios",
1562
- start,
1563
- primary,
1564
- end,
1565
- stack = false
1566
- }) {
1567
- const { styles } = useStyles(traySheet);
1568
- const secondaries = /* @__PURE__ */ jsxs(Fragment, { children: [
1569
- /* @__PURE__ */ jsx(View, { style: styles.slotStart, children: start }),
1570
- /* @__PURE__ */ jsx(View, { style: styles.slotPrimary, children: stack ? null : primary }),
1571
- /* @__PURE__ */ jsx(View, { style: styles.slotEnd, children: end })
1572
- ] });
1573
- if (!stack) {
1574
- return /* @__PURE__ */ jsx(View, { style: styles.tray, testID: `loam-tray-${platform}`, children: secondaries });
1575
- }
1576
- return /* @__PURE__ */ jsxs(View, { style: styles.stackedTray, testID: `loam-tray-${platform}`, children: [
1577
- /* @__PURE__ */ jsx(View, { style: styles.stackedPrimary, children: primary }),
1578
- /* @__PURE__ */ jsx(View, { style: styles.stackedRow, children: secondaries })
1579
- ] });
1580
- }
1581
- var traySheet = createStyleSheet((theme) => ({
1582
- // Tight on the block axis: the shutter is the tray's height, and padding
1583
- // above and below it is preview the user no longer sees.
1584
- tray: {
1585
- flexDirection: "row",
1586
- alignItems: "center",
1587
- justifyContent: "space-between",
1588
- gap: theme.space[16],
1589
- paddingHorizontal: theme.space[16],
1590
- paddingVertical: theme.space[4]
1591
- },
1592
- stackedTray: {
1593
- flexDirection: "column",
1594
- gap: theme.space[8],
1595
- paddingHorizontal: theme.space[16],
1596
- paddingVertical: theme.space[4]
1597
- },
1598
- stackedPrimary: {
1599
- flexDirection: "row",
1600
- alignItems: "center",
1601
- justifyContent: "center"
1602
- },
1603
- stackedRow: {
1604
- flexDirection: "row",
1605
- alignItems: "center",
1606
- justifyContent: "space-between",
1607
- gap: theme.space[16]
1608
- },
1609
- slotStart: {
1610
- width: theme.space[48],
1611
- flexGrow: 0,
1612
- flexShrink: 0,
1613
- flexDirection: "row",
1614
- alignItems: "center",
1615
- justifyContent: "flex-start"
1616
- },
1617
- slotPrimary: {
1618
- flexGrow: 1,
1619
- flexShrink: 1,
1620
- flexBasis: theme.space[0],
1621
- flexDirection: "row",
1622
- alignItems: "center",
1623
- justifyContent: "center"
1624
- },
1625
- slotEnd: {
1626
- width: theme.space[48],
1627
- flexGrow: 0,
1628
- flexShrink: 0,
1629
- flexDirection: "row",
1630
- alignItems: "center",
1631
- justifyContent: "flex-end"
1632
- }
1633
- }));
1634
-
1635
- export { ContinuousNotice, CountdownRing, EV_STOPS, ExpertPanel, FlipButton, FocusIndicator, FocusTapZone, GridOverlay, GridToggle, GuideOverlay, LensPicker, ScanLine, SequenceStrip, ShutterButton, ShutterTray, TorchToggle, TrackChip, TrackCountPill, TrackedBox, TrackingOverlay };